[Buildbot-commits] buildbot/buildbot/test test_config.py,1.18,1.19
Brian Warner
warner at users.sourceforge.net
Fri May 6 04:58:01 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24357/buildbot/test
Modified Files:
test_config.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-139
Creator: Brian Warner <warner at monolith.lothar.com>
Merged from warner at monolith.lothar.com--2005 (patch 4-5)
Stop using mktap, create buildbot.tac instead.
Patches applied:
* warner at monolith.lothar.com--2005/buildbot--dev--0--patch-4
stop using mktap, create buildbot.tac instead
* warner at monolith.lothar.com--2005/buildbot--dev--0--patch-5
remove more old mktap-related code
Index: test_config.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- test_config.py 4 May 2005 06:44:31 -0000 1.18
+++ test_config.py 6 May 2005 04:57:59 -0000 1.19
@@ -911,55 +911,3 @@
m = BuildMaster("test_cf", "alternate.cfg")
m.loadTheConfigFile()
self.failUnlessEqual(m.slavePortnum, 9000)
-
-saveCfg1 = \
-"""
-from buildbot.changes import pb
-from buildbot.status import html, client
-c = {}
-c['bots'] = []
-c['sources'] = [pb.PBChangeSource()]
-c['builders'] = []
-c['slavePortnum'] = 0
-c['status'] = [html.Waterfall(http_port=0), client.PBListener(0)]
-BuildmasterConfig = c
-"""
-
-class Save(unittest.TestCase):
- def setUp(self):
- self.saved_argv = sys.argv
- def tearDown(self):
- sys.argv = self.saved_argv
-
- def testSave(self):
- # the idea here is to create the same buildbot.tap file that 'mktap
- # buildbot master --basedir test_save' would create. Then we load it,
- # and make sure it looks ok. We copy some code from
- # twisted.scripts.mktap to avoid spawning a mktap instance (who knows
- # how to accomplish such a thing under windows).
-
- from twisted.scripts import mktap
- os.mkdir("test_save")
- f = open(os.path.join("test_save", "master.cfg"), "w")
- f.write(saveCfg1)
- f.close()
- tapname = os.path.join("test_save", "buildbot.tap")
- self.failIf(os.path.exists(tapname)) # shouldn't ever happen
- sys.argv = ["mktap", "-a", tapname,
- "buildbot", "master", "--basedir", "test_save"]
- mktap.run() # creates test_save/buildbot.tap
-
- # now start the buildmaster from there
- a = service.loadApplication(tapname, "pickle", None)
- service.IService(a).startService()
-
- # the buildmaster ought to be running now
- m = service.IService(a).getServiceNamed("buildmaster")
- self.failUnless(m.running)
- self.failUnlessEqual(len(list(m.change_svc)), 1)
-
- # now shut it down
- d = defer.maybeDeferred(service.IService(a).stopService)
- dr(d)
-
- # done
More information about the Commits
mailing list