[Buildbot-commits] buildbot/buildbot/scripts runner.py,1.32,1.33 tryclient.py,1.3,1.4
Brian Warner
warner at users.sourceforge.net
Thu Aug 11 20:21:35 UTC 2005
Update of /cvsroot/buildbot/buildbot/buildbot/scripts
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29870/buildbot/scripts
Modified Files:
runner.py tryclient.py
Log Message:
Revision: arch at buildbot.sf.net--2004/buildbot--dev--0--patch-281
Creator: Brian Warner <warner at monolith.lothar.com>
add --builder control to 'buildbot try'
* docs/buildbot.texinfo (try): document both --builder and
'try_builders' in .buildbot/options
* buildbot/scripts/runner.py (TryOptions): add --builder,
accumulate the values into opts['builders']
* buildbot/scripts/tryclient.py (Try.__init__): set builders
* buildbot/test/test_runner.py (Try): add some quick tests to make
sure 'buildbot try --options' and .buildbot/options get parsed
* buildbot/test/test_scheduler.py (Scheduling.testTryUserpass):
use --builder control
--This line, and those below, will be ignored--
Files to commit:
<can't compute list>
This list might be incomplete or outdated if editing the log
message was not invoked from an up-to-date changes buffer!
Index: runner.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/runner.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- runner.py 11 Aug 2005 08:22:16 -0000 1.32
+++ runner.py 11 Aug 2005 20:21:30 -0000 1.33
@@ -577,12 +577,22 @@
["vc", None, None,
"The VC system in use, one of: cvs,svn,tla,baz,darcs"],
+
+ ["builder", "b", None,
+ "Run the trial build on this Builder. Can be used multiple times."],
]
optFlags = [
["wait", None, "wait until the builds have finished"],
]
+ def __init__(self):
+ super(TryOptions, self).__init__()
+ self['builders'] = []
+
+ def opt_builder(self, option):
+ self['builders'].append(option)
+
def getSynopsis(self):
return "Usage: buildbot try [options]"
Index: tryclient.py
===================================================================
RCS file: /cvsroot/buildbot/buildbot/buildbot/scripts/tryclient.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- tryclient.py 11 Aug 2005 08:22:16 -0000 1.3
+++ tryclient.py 11 Aug 2005 20:21:30 -0000 1.4
@@ -162,14 +162,15 @@
self.config = config
self.opts = runner.loadOptions()
self.connect = self.getopt('connect', 'try_connect')
- print "using '%s' connect method" % self.connect
- self.builderNames = ["a", "b"] # TODO: add UI for this
+ self.builderNames = self.getopt('builders', 'try_builders')
+ assert self.builderNames, "no builders! use --builder or " \
+ "try_builders=[names..] in .buildbot/options"
def getopt(self, config_name, options_name, default=None):
value = self.config.get(config_name)
- if value is None:
+ if value is None or value == []:
value = self.opts.get(options_name)
- if value is None:
+ if value is None or value == []:
value = default
assert value is not None
return value
@@ -265,6 +266,7 @@
def run(self):
# we can't do spawnProcess until we're inside reactor.run(), so get
# funky
+ print "using '%s' connect method" % self.connect
d = defer.Deferred()
d.addCallback(lambda res: self.createJob())
d.addCallback(lambda res: self.announce("job created"))
More information about the Commits
mailing list