[Buildbot-commits] buildbot/buildbot/test test_changes.py, 1.10, 1.11 test_config.py, 1.44, 1.45 test_control.py, 1.15, 1.16 test_dependencies.py, 1.6, 1.7 test_locks.py, 1.8, 1.9 test_properties.py, 1.8, 1.9 test_run.py, 1.44, 1.45 test_slaves.py, 1.9, 1.10 test_status.py, 1.41, 1.42 test_steps.py, 1.40, 1.41 test_vc.py, 1.74, 1.75 test_web.py, 1.44, 1.45
Brian Warner
warner at users.sourceforge.net
Fri Jul 27 10:13:58 UTC 2007
Update of /cvsroot/buildbot/buildbot/buildbot/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv31962/buildbot/test
Modified Files:
test_changes.py test_config.py test_control.py
test_dependencies.py test_locks.py test_properties.py
test_run.py test_slaves.py test_status.py test_steps.py
test_vc.py test_web.py
Log Message:
[project @ rename c['bots'] to c['slaves'], and use buildbot.slave.BuildSlave instances instead of tuples. Closes #63.]
Original author: warner at lothar.com
Date: 2007-07-27 09:11:01+00:00
Index: test_changes.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_changes.py,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- test_changes.py 11 Dec 2006 08:23:29 -0000 1.10
+++ test_changes.py 27 Jul 2007 10:13:55 -0000 1.11
@@ -97,7 +97,7 @@
config_empty = """
BuildmasterConfig = c = {}
-c['bots'] = []
+c['slaves'] = []
c['builders'] = []
c['sources'] = []
c['schedulers'] = []
Index: test_config.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_config.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- test_config.py 18 Jun 2007 03:58:23 -0000 1.44
+++ test_config.py 27 Jul 2007 10:13:55 -0000 1.45
@@ -36,7 +36,7 @@
emptyCfg = \
"""
BuildmasterConfig = c = {}
-c['bots'] = []
+c['slaves'] = []
c['sources'] = []
c['schedulers'] = []
c['builders'] = []
@@ -49,8 +49,9 @@
buildersCfg = \
"""
from buildbot.process.factory import BasicBuildFactory
+from buildbot.slave import BuildSlave
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
c['slavePortnum'] = 9999
@@ -158,8 +159,9 @@
interlockCfgBad = \
"""
from buildbot.process.factory import BasicBuildFactory
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
f1 = BasicBuildFactory('cvsroot', 'cvsmodule')
@@ -181,8 +183,9 @@
from buildbot.steps.dummy import Dummy
from buildbot.process.factory import BuildFactory, s
from buildbot.locks import MasterLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
l1 = MasterLock('lock1')
@@ -203,8 +206,9 @@
from buildbot.steps.dummy import Dummy
from buildbot.process.factory import BuildFactory, s
from buildbot.locks import MasterLock, SlaveLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
l1 = MasterLock('lock1')
@@ -225,8 +229,9 @@
from buildbot.steps.dummy import Dummy
from buildbot.process.factory import BuildFactory, s
from buildbot.locks import MasterLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
l1 = MasterLock('lock1')
@@ -247,8 +252,9 @@
"""
from buildbot.process.factory import BasicBuildFactory
from buildbot.locks import MasterLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
f1 = BasicBuildFactory('cvsroot', 'cvsmodule')
@@ -268,8 +274,9 @@
"""
from buildbot.process.factory import BasicBuildFactory
from buildbot.locks import MasterLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
f1 = BasicBuildFactory('cvsroot', 'cvsmodule')
@@ -291,8 +298,9 @@
from buildbot.steps.dummy import Dummy
from buildbot.process.factory import BuildFactory, s
from buildbot.locks import MasterLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
l1 = MasterLock('lock1')
@@ -315,8 +323,9 @@
from buildbot.steps.dummy import Dummy
from buildbot.process.factory import BuildFactory, s
from buildbot.locks import MasterLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
l1 = MasterLock('lock1')
@@ -339,8 +348,9 @@
from buildbot.steps.dummy import Dummy
from buildbot.process.factory import BuildFactory, s
from buildbot.locks import MasterLock
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
l1 = MasterLock('lock1')
@@ -362,8 +372,9 @@
"""
from buildbot.scheduler import Scheduler, Dependent
from buildbot.process.factory import BasicBuildFactory
+from buildbot.slave import BuildSlave
c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
f1 = BasicBuildFactory('cvsroot', 'cvsmodule')
b1 = {'name':'builder1', 'slavename':'bot1',
@@ -496,6 +507,15 @@
master.loadConfig(emptyCfg)
self.failUnlessEqual(master.checker.users,
{"change": "changepw"})
+ slavesCfg = (emptyCfg +
+ "from buildbot.slave import BuildSlave\n"
+ "c['slaves'] = [BuildSlave('bot1','pw1'), "
+ "BuildSlave('bot2','pw2')]\n")
+ master.loadConfig(slavesCfg)
+ self.failUnlessEqual(master.checker.users,
+ {"change": "changepw",
+ "bot1": "pw1",
+ "bot2": "pw2"})
def testSources(self):
@@ -1107,8 +1127,9 @@
from buildbot.process.factory import BuildFactory, s
from buildbot.steps.shell import ShellCommand
from buildbot.steps.source import Darcs
+from buildbot.slave import BuildSlave
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'pw1')]
+c['slaves'] = [BuildSlave('bot1', 'pw1')]
c['sources'] = []
c['schedulers'] = []
c['slavePortnum'] = 9999
Index: test_control.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_control.py,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- test_control.py 11 Dec 2006 08:40:17 -0000 1.15
+++ test_control.py 27 Jul 2007 10:13:55 -0000 1.16
@@ -15,6 +15,7 @@
config = """
from buildbot.process import factory
from buildbot.steps import dummy
+from buildbot.slave import BuildSlave
def s(klass, **kwargs):
return (klass, kwargs)
@@ -23,7 +24,7 @@
s(dummy.Dummy, timeout=1),
])
c = {}
-c['bots'] = [['bot1', 'sekrit']]
+c['slaves'] = [BuildSlave('bot1', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['builders'] = [{'name': 'force', 'slavename': 'bot1',
Index: test_dependencies.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_dependencies.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- test_dependencies.py 11 Dec 2006 08:23:29 -0000 1.6
+++ test_dependencies.py 27 Jul 2007 10:13:55 -0000 1.7
@@ -11,11 +11,12 @@
from buildbot import scheduler
from buildbot.process import factory
from buildbot.steps import dummy
+from buildbot.slave import BuildSlave
s = factory.s
from buildbot.test.test_locks import LockStep
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'sekrit'), ('bot2', 'sekrit')]
+c['slaves'] = [BuildSlave('bot1', 'sekrit'), BuildSlave('bot2', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['slavePortnum'] = 0
Index: test_locks.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_locks.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- test_locks.py 11 Dec 2006 08:23:29 -0000 1.8
+++ test_locks.py 27 Jul 2007 10:13:55 -0000 1.9
@@ -283,11 +283,12 @@
config_1 = """
from buildbot import locks
from buildbot.process import factory
+from buildbot.slave import BuildSlave
s = factory.s
from buildbot.test.test_locks import LockStep
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'sekrit'), ('bot2', 'sekrit')]
+c['slaves'] = [BuildSlave('bot1', 'sekrit'), BuildSlave('bot2', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['slavePortnum'] = 0
Index: test_properties.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_properties.py,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- test_properties.py 4 Jul 2007 05:09:41 -0000 1.8
+++ test_properties.py 27 Jul 2007 10:13:55 -0000 1.9
@@ -135,10 +135,11 @@
run_config = """
from buildbot.process import factory
from buildbot.steps.shell import ShellCommand, WithProperties
+from buildbot.slave import BuildSlave
s = factory.s
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'sekrit')]
+c['slaves'] = [BuildSlave('bot1', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['slavePortnum'] = 0
Index: test_run.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_run.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- test_run.py 3 Jul 2007 17:25:08 -0000 1.44
+++ test_run.py 27 Jul 2007 10:13:55 -0000 1.45
@@ -15,6 +15,7 @@
config_base = """
from buildbot.process import factory
from buildbot.steps import dummy
+from buildbot.slave import BuildSlave
s = factory.s
f1 = factory.QuickBuildFactory('fakerep', 'cvsmodule', configure=None)
@@ -25,7 +26,7 @@
])
BuildmasterConfig = c = {}
-c['bots'] = [['bot1', 'sekrit']]
+c['slaves'] = [BuildSlave('bot1', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['builders'] = []
Index: test_slaves.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_slaves.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- test_slaves.py 3 Jul 2007 17:25:08 -0000 1.9
+++ test_slaves.py 27 Jul 2007 10:13:55 -0000 1.10
@@ -13,10 +13,12 @@
config_1 = """
from buildbot.process import factory
from buildbot.steps import dummy
+from buildbot.slave import BuildSlave
s = factory.s
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'sekrit'), ('bot2', 'sekrit'), ('bot3', 'sekrit')]
+c['slaves'] = [BuildSlave('bot1', 'sekrit'), BuildSlave('bot2', 'sekrit'),
+ BuildSlave('bot3', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['slavePortnum'] = 0
@@ -190,10 +192,11 @@
config_3 = """
from buildbot.process import factory
from buildbot.steps import dummy
+from buildbot.slave import BuildSlave
s = factory.s
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'sekrit')]
+c['slaves'] = [BuildSlave('bot1', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['slavePortnum'] = 0
Index: test_status.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_status.py,v
retrieving revision 1.41
retrieving revision 1.42
diff -u -d -r1.41 -r1.42
--- test_status.py 17 Apr 2007 06:38:51 -0000 1.41
+++ test_status.py 27 Jul 2007 10:13:55 -0000 1.42
@@ -729,6 +729,7 @@
config_base = """
from buildbot.process import factory
from buildbot.steps import dummy
+from buildbot.slave import BuildSlave
s = factory.s
f1 = factory.QuickBuildFactory('fakerep', 'cvsmodule', configure=None)
@@ -739,7 +740,7 @@
])
BuildmasterConfig = c = {}
-c['bots'] = [['bot1', 'sekrit']]
+c['slaves'] = [BuildSlave('bot1', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['builders'] = []
Index: test_steps.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_steps.py,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- test_steps.py 17 Jul 2007 19:48:40 -0000 1.40
+++ test_steps.py 27 Jul 2007 10:13:55 -0000 1.41
@@ -311,11 +311,12 @@
version_config = """
from buildbot.process import factory
from buildbot.test.test_steps import VersionCheckingStep
+from buildbot.slave import BuildSlave
BuildmasterConfig = c = {}
f1 = factory.BuildFactory([
factory.s(VersionCheckingStep),
])
-c['bots'] = [['bot1', 'sekrit']]
+c['slaves'] = [BuildSlave('bot1', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['builders'] = [{'name':'quick', 'slavename':'bot1',
Index: test_vc.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_vc.py,v
retrieving revision 1.74
retrieving revision 1.75
diff -u -d -r1.74 -r1.75
--- test_vc.py 18 Jun 2007 02:52:49 -0000 1.74
+++ test_vc.py 27 Jul 2007 10:13:55 -0000 1.75
@@ -97,13 +97,14 @@
config_vc = """
from buildbot.process import factory
from buildbot.steps import source
+from buildbot.slave import BuildSlave
s = factory.s
f1 = factory.BuildFactory([
%s,
])
c = {}
-c['bots'] = [['bot1', 'sekrit']]
+c['slaves'] = [BuildSlave('bot1', 'sekrit')]
c['sources'] = []
c['schedulers'] = []
c['builders'] = [{'name': 'vc', 'slavename': 'bot1',
Index: test_web.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/test/test_web.py,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- test_web.py 18 Jun 2007 02:52:49 -0000 1.44
+++ test_web.py 27 Jul 2007 10:13:55 -0000 1.45
@@ -36,7 +36,7 @@
base_config = """
from buildbot.status import html
BuildmasterConfig = c = {
- 'bots': [],
+ 'slaves': [],
'sources': [],
'schedulers': [],
'builders': [],
@@ -281,6 +281,7 @@
from buildbot.steps import dummy
from buildbot.scheduler import Scheduler
from buildbot.changes.base import ChangeSource
+from buildbot.slave import BuildSlave
s = factory.s
class DiscardScheduler(Scheduler):
@@ -290,7 +291,7 @@
pass
BuildmasterConfig = c = {}
-c['bots'] = [('bot1', 'sekrit'), ('bot2', 'sekrit')]
+c['slaves'] = [BuildSlave('bot1', 'sekrit'), BuildSlave('bot2', 'sekrit')]
c['sources'] = [DummyChangeSource()]
c['schedulers'] = [DiscardScheduler('discard', None, 60, ['b1'])]
c['slavePortnum'] = 0
@@ -385,9 +386,10 @@
config = """
from buildbot.status import html
from buildbot.process.factory import BasicBuildFactory
+from buildbot.slave import BuildSlave
f1 = BasicBuildFactory('cvsroot', 'cvsmodule')
BuildmasterConfig = {
- 'bots': [('bot1', 'passwd1')],
+ 'slaves': [BuildSlave('bot1', 'passwd1')],
'sources': [],
'schedulers': [],
'builders': [{'name': 'builder1', 'slavename': 'bot1',
More information about the Commits
mailing list