[Buildbot-commits] buildbot/buildbot/test runutils.py, 1.12, 1.13 test_steps.py, 1.24, 1.25
Brian Warner
warner at users.sourceforge.net
Mon Aug 21 00:43:22 UTC 2006
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv4503/buildbot/test
Modified Files:
runutils.py test_steps.py
Log Message:
[project @ accept either a single string or a list for ShellCommand description=]
This fixes SF#1524659, thanks to Paul Winkler for the catch.
Original author: warner at lothar.com
Date: 2006-08-21 00:38:00
Index: runutils.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/runutils.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- runutils.py 20 Aug 2006 22:25:35 -0000 1.12
+++ runutils.py 21 Aug 2006 00:43:20 -0000 1.13
@@ -229,7 +229,7 @@
s3.stepStarted()
return s3
-def makeBuildStep(basedir):
+def makeBuildStep(basedir, step_class=BuildStep, **kwargs):
bss = setupBuildStepStatus(basedir)
ss = SourceStamp()
@@ -239,7 +239,7 @@
br = BuildRequest("reason", ss)
b = Build([br])
b.setBuilder(b0)
- s = BuildStep(b)
+ s = step_class(build=b, **kwargs)
s.setStepStatus(bss)
b.setupStatus(bss.getBuild())
return s
Index: test_steps.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- test_steps.py 20 Aug 2006 22:25:35 -0000 1.24
+++ test_steps.py 21 Aug 2006 00:43:20 -0000 1.25
@@ -259,6 +259,24 @@
l2.addStdout("twostuff")
self.failUnlessEqual(o2.out, "twostuff")
+ # test more stuff about ShellCommands
+
+ def test_description(self):
+ s = makeBuildStep("test_steps.Steps.test_description.1",
+ step_class=ShellCommand,
+ workdir="dummy",
+ description=["list", "of", "strings"],
+ descriptionDone=["another", "list"])
+ self.failUnlessEqual(s.description, ["list", "of", "strings"])
+ self.failUnlessEqual(s.descriptionDone, ["another", "list"])
+
+ s = makeBuildStep("test_steps.Steps.test_description.2",
+ step_class=ShellCommand,
+ workdir="dummy",
+ description="single string",
+ descriptionDone="another string")
+ self.failUnlessEqual(s.description, ["single string"])
+ self.failUnlessEqual(s.descriptionDone, ["another string"])
class VersionCheckingStep(step.BuildStep):
def start(self):
More information about the Commits
mailing list