[Buildbot-commits] buildbot/buildbot/test test_steps.py, 1.19, 1.20 test_web.py, 1.30, 1.31

Brian Warner warner at users.sourceforge.net
Fri Jun 16 05:28:15 UTC 2006


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

Modified Files:
	test_steps.py test_web.py 
Log Message:
[project @ rearrange BuildStatus.addStepWithName a bit]

Original author: warner at lothar.com
Date: 2006-06-16 05:10:59

Index: test_steps.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- test_steps.py	16 Jun 2006 05:28:06 -0000	1.19
+++ test_steps.py	16 Jun 2006 05:28:13 -0000	1.20
@@ -24,7 +24,7 @@
 from buildbot.process import step, base, factory
 from buildbot.process.step import ShellCommand #, ShellCommands
 from buildbot.status import builder
-from buildbot.test.runutils import RunMixin, setupBuildStep
+from buildbot.test.runutils import RunMixin, setupBuildStepStatus
 from buildbot.twcompat import maybeWait
 from buildbot.slave import commands
 
@@ -101,7 +101,7 @@
         c = MyShellCommand(workdir=dir, command=cmd, build=self.build,
                            timeout=10)
         self.assertEqual(self.remote.events, expectedEvents)
-        c.step_status = self.build_status.addStep("myshellcommand")
+        c.step_status = self.build_status.addStepWithName("myshellcommand")
         d = c.startStep(self.remote)
         self.failUnless(c.started)
         rc = c.rc

Index: test_web.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -d -r1.30 -r1.31
--- test_web.py	2 Jun 2006 06:26:28 -0000	1.30
+++ test_web.py	16 Jun 2006 05:28:13 -0000	1.31
@@ -389,16 +389,16 @@
         self.port = port
         # insert an event
 
-        s = m.status.getBuilder("builder1")
         req = base.BuildRequest("reason", sourcestamp.SourceStamp())
-        bs = s.newBuild()
         build1 = base.Build([req])
-        step1 = step.BuildStep(build=build1)
-        step1.name = "setup"
-        bs.addStep(step1)
-        bs.buildStarted(build1)
-        step1.step_status.stepStarted()
+        bs = m.status.getBuilder("builder1").newBuild()
         bs.setReason("reason")
+        bs.buildStarted(build1)
+
+        step1 = step.BuildStep(build=build1, name="setup")
+        bss = bs.addStepWithName("setup")
+        step1.setStepStatus(bss)
+        bss.stepStarted()
 
         log1 = step1.addLog("output")
         log1.addStdout("some stdout\n")





More information about the Commits mailing list