[Buildbot-commits] buildbot/buildbot/process process_twisted.py,1.40,1.41 step_twisted.py,1.71,1.72
Brian Warner
warner at users.sourceforge.net
Wed Oct 26 20:38:09 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/process
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26116/buildbot/process
Modified Files:
process_twisted.py step_twisted.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-400
Creator: Brian Warner <warner at lothar.com>
make it possible to use step_twisted.Trial with very new Twisted
* buildbot/process/step_twisted.py (Trial): expose the trialMode=
argv-list as an argument, defaulting to ["-to"], which is
appropriate for the Trial that comes with Twisted-2.1.0 and
earlier. The Trial in current Twisted SVN wants
["--reporter=bwverbose"] instead. Also expose trialArgs=, which
defaults to an empty list.
* buildbot/process/process_twisted.py (TwistedTrial.trialMode):
match it, now that trialMode= is a list instead of a single string
Index: process_twisted.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/process_twisted.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- process_twisted.py 21 Oct 2005 08:14:52 -0000 1.40
+++ process_twisted.py 26 Oct 2005 20:38:07 -0000 1.41
@@ -22,7 +22,7 @@
# the Trial in Twisted >=2.1.0 has --recurse on by default, and -to
# turned into --reporter=bwverbose .
recurse = False
- trialMode = "--reporter=bwverbose"
+ trialMode = ["--reporter=bwverbose"]
testpath = None
trial = "./bin/trial"
Index: step_twisted.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/process/step_twisted.py,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -d -r1.71 -r1.72
--- step_twisted.py 24 Oct 2005 04:20:47 -0000 1.71
+++ step_twisted.py 26 Oct 2005 20:38:07 -0000 1.72
@@ -204,7 +204,7 @@
flunkOnFailure = True
python = None
trial = "trial"
- trialMode = "-to"
+ trialMode = ["-to"]
trialArgs = []
testpath = UNSPECIFIED # required (but can be None)
testChanges = False # TODO: needs better name
@@ -216,7 +216,9 @@
def __init__(self, reactor=UNSPECIFIED, python=None, trial=None,
testpath=UNSPECIFIED,
tests=None, testChanges=None,
- recurse=None, randomly=None, **kwargs):
+ recurse=None, randomly=None,
+ trialMode=None, trialArgs=None,
+ **kwargs):
"""
@type testpath: string
@param testpath: use in PYTHONPATH when running the tests. If
@@ -239,6 +241,18 @@
'python', this should be set to an explicit path (because
'python2.3 trial' will not work).
+ @type trialMode: list of strings
+ @param trialMode: a list of arguments to pass to trial, specifically
+ to set the reporting mode. This defaults to ['-to']
+ which means 'verbose colorless output' to the trial
+ that comes with Twisted-2.0.x and at least -2.1.0 .
+ Newer versions of Twisted may come with a trial
+ that prefers ['--reporter=bwverbose'].
+
+ @type trialArgs: list of strings
+ @param trialArgs: a list of arguments to pass to trial, available to
+ turn on any extra flags you like. Defaults to [].
+
@type tests: list of strings
@param tests: a list of test modules to run, like
['twisted.test.test_defer', 'twisted.test.test_process'].
@@ -300,6 +314,10 @@
self.trial = trial
if " " in self.trial:
raise ValueError("trial= value has spaces")
+ if trialMode is not None:
+ self.trialMode = trialMode
+ if trialArgs is not None:
+ self.trialArgs = trialArgs
if testpath is not UNSPECIFIED:
self.testpath = testpath
@@ -331,15 +349,14 @@
if self.python:
command.extend(self.python)
command.append(self.trial)
- command.append(self.trialMode)
+ command.extend(self.trialMode)
if self.recurse:
command.append("--recurse")
if self.reactor:
command.append("--reactor=%s" % reactor)
if self.randomly:
command.append("--random=0")
- if self.trialArgs:
- command.extend(self.trialArgs)
+ command.extend(self.trialArgs)
self.command = command
if self.reactor:
More information about the Commits
mailing list