[Buildbot-commits] buildbot/buildbot/test test_web.py,1.22,1.23 test_slaves.py,1.2,1.3

Brian Warner warner at users.sourceforge.net
Thu Oct 20 22:25:31 UTC 2005


Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9509/buildbot/test

Modified Files:
	test_web.py test_slaves.py 
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-344
Creator:  Brian Warner <warner at lothar.com>

clean up use of 'force build' methods

	* buildbot/interfaces.py (IBuilderControl.requestBuildSoon): new
	method specifically for use by HTML "force build" button and the
	IRC "force" command. Raises an immediate error if there are no
	slaves available.
	(IBuilderControl.requestBuild): make this just submit a build, not
	try to check for existing slaves or set up any when-finished
	Deferreds or anything.
	* buildbot/process/builder.py (BuilderControl): same
	* buildbot/status/html.py (StatusResourceBuilder.force): same
	* buildbot/status/words.py (IrcStatusBot.command_FORCE): same
	* buildbot/test/test_slaves.py: same
	* buildbot/test/test_web.py: same


Index: test_slaves.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_slaves.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- test_slaves.py	14 Oct 2005 19:42:39 -0000	1.2
+++ test_slaves.py	20 Oct 2005 22:25:29 -0000	1.3
@@ -40,7 +40,8 @@
 
     def doBuild(self, buildername):
         br = BuildRequest("forced", SourceStamp())
-        d = self.control.getBuilder(buildername).requestBuild(br)
+        d = br.waitUntilFinished()
+        self.control.getBuilder(buildername).requestBuild(br)
         return d
 
     def testSequence(self):
@@ -138,7 +139,8 @@
         timers = []
         self.slaves['bot1'].debugOpts["stallPings"] = (10, timers)
         br = BuildRequest("forced", SourceStamp())
-        d1 = self.control.getBuilder("b1").requestBuild(br)
+        d1 = br.waitUntilFinished()
+        self.control.getBuilder("b1").requestBuild(br)
         s1 = br.status # this is a BuildRequestStatus
         # give it a chance to start pinging
         d2 = defer.Deferred()
@@ -181,7 +183,8 @@
         # step.
         self.revision += 1
         br = BuildRequest(reason, SourceStamp(revision=self.revision))
-        d = self.control.getBuilder(buildername).requestBuild(br)
+        d = br.waitUntilFinished()
+        self.control.getBuilder(buildername).requestBuild(br)
         return d
 
     def testFirstComeFirstServed(self):

Index: test_web.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- test_web.py	16 Oct 2005 06:25:34 -0000	1.22
+++ test_web.py	20 Oct 2005 22:25:29 -0000	1.23
@@ -282,7 +282,8 @@
 
     def doBuild(self, buildername):
         br = base.BuildRequest("forced", sourcestamp.SourceStamp())
-        d = self.control.getBuilder(buildername).requestBuild(br)
+        d = br.waitUntilFinished()
+        self.control.getBuilder(buildername).requestBuild(br)
         return d
 
     def assertNoURL(self, target):





More information about the Commits mailing list