[svn r63158] UI improvements

--HG--
branch : trunk
This commit is contained in:
hpk 2009-03-20 22:13:47 +01:00
parent 69e68bed29
commit 1b3384b7bd
4 changed files with 10 additions and 9 deletions

View File

@ -9,7 +9,7 @@ from py.__.test import event
from py.__.test.runner import basic_run_report, basic_collect_report
from py.__.test.session import Session
from py.__.test import outcome
from py.__.test.dsession.nodemanage import NodeManager
from py.__.test.dsession.nodemanage import NodeManager, getxspecs
import Queue
@ -81,12 +81,9 @@ class DSession(Session):
raise ValueError, "--exec together with --pdb not supported."
if option.executable and not option.dist and not option.numprocesses:
option.numprocesses = 1
config = self.config
if config.option.numprocesses:
return
try:
config.getvalue('xspecs')
except KeyError:
getxspecs(self.config)
except self.config.Error:
print "Please specify test environments for distribution of tests:"
print "py.test --tx ssh=user@somehost --tx popen//python=python2.5"
print "conftest.py: pytest_option_tx=['ssh=user@somehost','popen']"

View File

@ -59,7 +59,6 @@ class NodeManager(object):
self.gwmanager.rsync(self.config.topdir, **options)
# and cd into it
self.gwmanager.multi_chdir(self.config.topdir.basename, inplacelocal=False)
self.config.bus.notify("rsyncfinished")
def trace(self, msg):
self.config.bus.notify("trace", "nodemanage", msg)
@ -100,7 +99,8 @@ def getxspecs(config):
xspecs = config.option.xspecs
if not xspecs:
xspecs = config.getvalue("xspecs")
assert xspecs is not None
if xspecs is None:
raise config.Error("MISSING test execution (tx) nodes: please specify --tx")
#print "option value for xspecs", xspecs
return [py.execnet.XSpec(x) for x in xspecs]

View File

@ -46,6 +46,7 @@ class TestNodeManager:
assert dest.join("dir1").check()
assert dest.join("dir1", "dir2").check()
assert dest.join("dir1", "dir2", 'hello').check()
nodemanager.gwmanager.exit()
def test_init_rsync_roots(self, source, dest):
dir2 = source.ensure("dir1", "dir2", dir=1)

View File

@ -89,7 +89,10 @@ class TerminalReporter:
def pyevent_gwmanage_rsyncstart(self, source, gateways):
targets = ", ".join([gw.id for gw in gateways])
self.write_line("rsyncstart: %s -> %s" %(source, targets))
msg = "rsyncstart: %s -> %s" %(source, targets)
if not self.config.option.verbose:
msg += " # use --verbose to see rsync progress"
self.write_line(msg)
def pyevent_gwmanage_rsyncfinish(self, source, gateways):
targets = ", ".join([gw.id for gw in gateways])