[Buildbot-commits] buildbot/buildbot/test test_steps.py,1.44,1.45
Brian Warner
warner at users.sourceforge.net
Sat Dec 15 01:02:06 UTC 2007
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv28273/buildbot/test
Modified Files:
test_steps.py
Log Message:
[project @ ShellCommand: record RemoteShellCommand args to, to get 'workdir' and 'env' and 'timeout'. Ought to fix #150.]
Original author: warner at lothar.com
Date: 2007-12-15 00:58:16+00:00
Index: test_steps.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- test_steps.py 12 Aug 2007 22:22:41 -0000 1.44
+++ test_steps.py 15 Dec 2007 01:02:04 -0000 1.45
@@ -200,6 +200,36 @@
b = f.newBuild([req])
#for s in b.steps: print s.name
+ def failUnlessClones(self, s1, attrnames):
+ f1 = s1.getStepFactory()
+ f,args = f1
+ s2 = f(**args)
+ for name in attrnames:
+ self.failUnlessEqual(getattr(s1, name), getattr(s2, name))
+
+ def clone(self, s1):
+ f1 = s1.getStepFactory()
+ f,args = f1
+ s2 = f(**args)
+ return s2
+
+ def testClone(self):
+ s1 = shell.ShellCommand(command=["make", "test"],
+ timeout=1234,
+ workdir="here",
+ description="yo",
+ descriptionDone="yoyo",
+ env={'key': 'value'},
+ want_stdout=False,
+ want_stderr=False,
+ logfiles={"name": "filename"},
+ )
+ shellparms = (buildstep.BuildStep.parms +
+ ("remote_kwargs description descriptionDone "
+ "command logfiles").split() )
+ self.failUnlessClones(s1, shellparms)
+
+
# test the various methods available to buildsteps
def test_getProperty(self):
More information about the Commits
mailing list