[Buildbot-commits] buildbot/buildbot/test test_steps.py,1.12,1.13 test_vc.py,1.27,1.28 test_status.py,1.15,1.16
Brian Warner
warner at users.sourceforge.net
Fri May 6 06:40:06 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11379/buildbot/test
Modified Files:
test_steps.py test_vc.py test_status.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-143
Creator: Brian Warner <warner at monolith.lothar.com>
Merged from warner at monolith.lothar.com--2005 (patch 7-8)
Patches applied:
* warner at monolith.lothar.com--2005/buildbot--dev--0--patch-7
Merged from arch at buildbot.sf.net--2004 (patch 137-142)
* warner at monolith.lothar.com--2005/buildbot--dev--0--patch-8
create OfflineLogFile to handle very large logs without lots of RAM
Index: test_status.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- test_status.py 26 Apr 2005 09:08:29 -0000 1.15
+++ test_status.py 6 May 2005 06:40:04 -0000 1.16
@@ -289,7 +289,7 @@
class Results(unittest.TestCase):
def testAddResults(self):
- b = builder.BuildStatus(None, 12)
+ b = builder.BuildStatus(builder.BuilderStatus("test"), 12)
testname = ("buildbot", "test", "test_status", "Results",
"testAddResults")
r1 = builder.TestResult(name=testname,
Index: test_steps.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- test_steps.py 24 Apr 2005 21:30:25 -0000 1.12
+++ test_steps.py 6 May 2005 06:40:04 -0000 1.13
@@ -14,7 +14,7 @@
# todo: test batched updates, by invoking remote_update(updates) instead of
# statusUpdate(update). Also involves interrupted builds.
-import sys, time
+import os, sys, time
from twisted.trial import unittest
from twisted.internet import reactor
@@ -28,7 +28,9 @@
#log.startLogging(sys.stdout)
class MyShellCommand(ShellCommand):
+ started = False
def runCommand(self, c):
+ self.started = True
self.rc = c
return ShellCommand.runCommand(self, c)
@@ -36,6 +38,7 @@
pass
class FakeBuilder:
statusbag = None
+ name = "fakebuilder"
def getSlaveCommandVersion(self, command, oldversion=None):
return "1.10"
@@ -60,8 +63,13 @@
class BuildStep(unittest.TestCase):
def setUp(self):
- self.build = base.Build()
self.builder = FakeBuilder()
+ self.builder_status = builder.BuilderStatus("fakebuilder")
+ self.builder_status.basedir = "test_steps"
+ os.mkdir(self.builder_status.basedir)
+ self.build_status = self.builder_status.newBuild()
+ self.build = base.Build()
+ self.build.build_status = self.build_status # fake it
self.build.builder = self.builder
self.remote = FakeRemote()
self.finished = 0
@@ -85,8 +93,9 @@
c = MyShellCommand(workdir=dir, command=cmd, build=self.build,
timeout=10)
self.assertEqual(self.remote.events, expectedEvents)
- c.step_status = builder.BuildStepStatus(None)
+ self.build_status.addStep(c)
d = c.startStep(self.remote)
+ self.failUnless(c.started)
rc = c.rc
d.addCallbacks(self.callback, self.errback)
timeout = time.time() + 10
@@ -113,6 +122,7 @@
for log in logs:
if log.getName() == "log":
break
+
rc.remoteUpdate({'header':
"command 'argle bargle' in dir 'murkle'\n\n"})
rc.remoteUpdate({'stdout': "foo\n"})
Index: test_vc.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -d -r1.27 -r1.28
--- test_vc.py 3 May 2005 20:02:04 -0000 1.27
+++ test_vc.py 6 May 2005 06:40:04 -0000 1.28
@@ -450,8 +450,11 @@
remote = m.botmaster.builders["vc"].remote
build = base.Build()
build.builder = FakeBuilder()
+ builder_status = builder.BuilderStatus("test")
+ builder_status.basedir = "basedir"
+ build_status = builder.BuildStatus(builder_status, 12)
c = vc(mode="clobber", workdir="build", build=build, **kwargs)
- c.step_status = builder.BuildStepStatus(None)
+ build_status.addStep(c)
build.setSourceStamp(revision, (0, p0_diff))
d = defer.maybeDeferred(c.startStep, remote)
r = dr(d)
@@ -468,7 +471,7 @@
# make sure that a rebuild does not use the leftover patched workdir
build.setSourceStamp(None, None)
c = vc(mode="update", workdir="build", build=build, **kwargs)
- c.step_status = builder.BuildStepStatus(None)
+ build_status.addStep(c)
d = defer.maybeDeferred(c.startStep, remote)
r = dr(d)
if r != SUCCESS:
More information about the Commits
mailing list