[Buildbot-commits] buildbot/buildbot/test test_properties.py, 1.7, 1.8
Brian Warner
warner at users.sourceforge.net
Wed Jul 4 05:09:44 UTC 2007
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31546/buildbot/test
Modified Files:
test_properties.py
Log Message:
[project @ ShellCommand: allow workdir= to be a WithProperties. Closes #43.]
Original author: warner at lothar.com
Date: 2007-07-04 05:08:34+00:00
Index: test_properties.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_properties.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- test_properties.py 18 Jun 2007 02:52:49 -0000 1.7
+++ test_properties.py 4 Jul 2007 05:09:41 -0000 1.8
@@ -60,6 +60,15 @@
self.failUnlessEqual(cmd,
["tar", "czf", "build-47.tar.gz", "source"])
+ def testWorkdir(self):
+ self.build.setProperty("revision", 47)
+ self.failUnlessEqual(self.build_status.getProperty("revision"), 47)
+ c = ShellCommand(command=["tar", "czf", "foo.tar.gz", "source"])
+ c.setBuild(self.build)
+ workdir = WithProperties("workdir-%d", "revision")
+ workdir = c._interpolateWorkdir(workdir)
+ self.failUnlessEqual(workdir, "workdir-47")
+
def testWithPropertiesDict(self):
self.build.setProperty("other", "foo")
self.build.setProperty("missing", None)
More information about the Commits
mailing list