[py-svn] r63158 - in py/trunk/py/test: dsession dsession/testing plugin
hpk at codespeak.net
hpk at codespeak.net
Fri Mar 20 22:13:49 CET 2009
Author: hpk
Date: Fri Mar 20 22:13:47 2009
New Revision: 63158
Modified:
py/trunk/py/test/dsession/dsession.py
py/trunk/py/test/dsession/nodemanage.py
py/trunk/py/test/dsession/testing/test_nodemanage.py
py/trunk/py/test/plugin/pytest_terminal.py
Log:
UI improvements
Modified: py/trunk/py/test/dsession/dsession.py
==============================================================================
--- py/trunk/py/test/dsession/dsession.py (original)
+++ py/trunk/py/test/dsession/dsession.py Fri Mar 20 22:13:47 2009
@@ -9,7 +9,7 @@
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 @@
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 at somehost --tx popen//python=python2.5"
print "conftest.py: pytest_option_tx=['ssh=user at somehost','popen']"
Modified: py/trunk/py/test/dsession/nodemanage.py
==============================================================================
--- py/trunk/py/test/dsession/nodemanage.py (original)
+++ py/trunk/py/test/dsession/nodemanage.py Fri Mar 20 22:13:47 2009
@@ -59,7 +59,6 @@
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 @@
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]
Modified: py/trunk/py/test/dsession/testing/test_nodemanage.py
==============================================================================
--- py/trunk/py/test/dsession/testing/test_nodemanage.py (original)
+++ py/trunk/py/test/dsession/testing/test_nodemanage.py Fri Mar 20 22:13:47 2009
@@ -46,6 +46,7 @@
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)
Modified: py/trunk/py/test/plugin/pytest_terminal.py
==============================================================================
--- py/trunk/py/test/plugin/pytest_terminal.py (original)
+++ py/trunk/py/test/plugin/pytest_terminal.py Fri Mar 20 22:13:47 2009
@@ -89,7 +89,10 @@
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])
More information about the pytest-commit
mailing list