[Buildbot-commits] buildbot/buildbot/test test_vc.py,1.33,1.34
Brian Warner
warner at users.sourceforge.net
Wed Jul 20 00:28:10 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2777/buildbot/test
Modified Files:
test_vc.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-247
Creator: Brian Warner <warner at lothar.com>
make sure tla 'my-id' parameter is set, otherwise Arch tests fail
* buildbot/test/test_vc.py (Arch.createRepository): set the tla ID
if it wasn't already set: most tla commands will fail unless one
has been set.
Index: test_vc.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- test_vc.py 19 Jul 2005 23:11:58 -0000 1.33
+++ test_vc.py 20 Jul 2005 00:28:06 -0000 1.34
@@ -335,15 +335,17 @@
self.httpServer = reactor.listenTCP(0, self.site)
self.httpPort = self.httpServer.getHost().port
- def runCommand(self, basedir, command):
- # all commands passed to do() should be strings. None of the
- # arguments may have spaces. This makes the commands less verbose at
- # the expense of restricting what they can specify.
- command = command.split(" ")
+ def runCommand(self, basedir, command, failureIsOk=False):
+ # all commands passed to do() should be strings or lists. If they are
+ # strings, none of the arguments may have spaces. This makes the
+ # commands less verbose at the expense of restricting what they can
+ # specify.
+ if type(command) not in (list, tuple):
+ command = command.split(" ")
d = utils.getProcessOutputAndValue(command[0], command[1:],
env=os.environ, path=basedir)
def check((out, err, code)):
- if code != 0:
+ if code != 0 and not failureIsOk:
log.msg("command %s finished with exit code %d" %
(command, code))
log.msg(" and stdout %s" % (out,))
@@ -354,8 +356,8 @@
d.addCallback(check)
return d
- def do(self, basedir, command):
- d = self.runCommand(basedir, command)
+ def do(self, basedir, command, failureIsOk=False):
+ d = self.runCommand(basedir, command, failureIsOk=failureIsOk)
return waitForDeferred(d)
def populate(self, basedir):
@@ -1162,6 +1164,14 @@
self.populate(tmp)
+ w = self.do(tmp, "tla my-id", failureIsOk=True)
+ yield w; res = w.getResult()
+ if not res:
+ # tla will fail a lot of operations if you have not set an ID
+ w = self.do(tmp, ["tla", "my-id",
+ "Buildbot Test Suite <test at buildbot.sf.net>"])
+ yield w; w.getResult()
+
w = waitForDeferred(self.unregisterRepository("tla"))
yield w; w.getResult()
More information about the Commits
mailing list