jhbuild r2256 - in trunk: . jhbuild/buildbot jhbuild/commands
- From: johncarr svn gnome org
- To: svn-commits-list gnome org
- Subject: jhbuild r2256 - in trunk: . jhbuild/buildbot jhbuild/commands
- Date: Fri, 15 Aug 2008 21:08:38 +0000 (UTC)
Author: johncarr
Date: Fri Aug 15 21:08:38 2008
New Revision: 2256
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2256&view=rev
Log:
Remove the need for any buildbot slave side custom code
Modified:
trunk/ChangeLog
trunk/jhbuild/buildbot/steps.py
trunk/jhbuild/commands/bot.py
Modified: trunk/jhbuild/buildbot/steps.py
==============================================================================
--- trunk/jhbuild/buildbot/steps.py (original)
+++ trunk/jhbuild/buildbot/steps.py Fri Aug 15 21:08:38 2008
@@ -27,26 +27,10 @@
class JHBuildSource(steps.source.Source):
name = "jhbuild"
- def __init__ (self, moduleset=None, module=None, stage=None, clobber=0, export=0, copydir=None, **kwargs):
- if not kwargs.has_key('mode') and (clobber or export or copydir):
- # deal with old configs
- warnings.warn("Please use mode=, not clobber/export/copydir",
- DeprecationWarning)
- if export:
- kwargs['mode'] = "export"
- elif clobber:
- kwargs['mode'] = "clobber"
- elif copydir:
- kwargs['mode'] = "copy"
- else:
- kwargs['mode'] = "update"
+ def __init__ (self, moduleset=None, module=None, stage=None, **kwargs):
steps.source.Source.__init__(self, **kwargs)
- self.args.update({'moduleset': moduleset,
- 'module': module,
- 'command': 'updateone',
- 'stage': None,
- 'timeout': 900,
- })
+ self.moduleset = moduleset
+ self.module = module
self.name = module + ' update'
self.description = [module + ' updating']
self.descriptionDone = [module + ' updated']
@@ -57,9 +41,18 @@
return max([int(c.revision) for c in changes])
def startVC(self, branch, revision, patch):
- warnings = []
- cmd = buildstep.LoggedRemoteCommand("jhbuild", self.args)
- self.startCommand(cmd, warnings)
+ command = ['jhbuild']
+ if (self.moduleset is not None):
+ command += ['--moduleset='+self.moduleset]
+ command += ['bot', '--step', 'updateone', self.module]
+ properties = self.build.getProperties()
+ kwargs = {}
+ kwargs['workdir'] = './'
+ #kwargs = properties.render(self.remote_kwargs)
+ kwargs['command'] = properties.render(command)
+ kwargs['env'] = {}
+ cmd = buildstep.RemoteShellCommand(**kwargs)
+ self.startCommand(cmd)
class UnitTestsObserver(buildstep.LogLineObserver):
@@ -122,7 +115,7 @@
if (moduleset is not None):
command += ['--moduleset='+moduleset]
command += ['bot', '--step', stage, module]
- self.name =module + ' ' + stage
+ self.name = module + ' ' + stage
self.description = [module + ' ' + stage + ' (running)']
self.descriptionDone = [module + ' ' + stage]
steps.shell.ShellCommand.__init__(self, description=self.description,
Modified: trunk/jhbuild/commands/bot.py
==============================================================================
--- trunk/jhbuild/commands/bot.py (original)
+++ trunk/jhbuild/commands/bot.py Fri Aug 15 21:08:38 2008
@@ -37,49 +37,6 @@
except ImportError:
buildbot = None
-
-class JhBuildbotCommand:
- # will be changed to inherit from BuildBotCommand once it is loaded
- jhbuildrc = None # will be config.filename
-
- def start(self):
- from buildbot.slave.commands import ShellCommand
- args = self.args
- moduleset = None
- stage = None
- module = None
- assert args['command'] is not None
- self.timeout = args.get('timeout', 120)
- command = args['command']
- if (args['stage'] is not None):
- stage = args['stage']
- if (args['module'] is not None):
- module = args['module']
- if (args['moduleset'] is not None):
- moduleset = args['moduleset']
- assert command in ['buildone','updateone','list']
- assert command not in ['buildone','updateone'] or module is not None
- runCommand = [sys.argv[0]]
- if (moduleset is not None):
- runCommand += ['--moduleset='+moduleset]
- runCommand += ['--file='+self.jhbuildrc]
- runCommand += ['--no-interact']
- runCommand += [command]
- if (stage is not None):
- runCommand += ['--stage='+stage]
- if (module is not None):
- runCommand += [module]
- c = ShellCommand(self.builder, runCommand, self.builder.basedir,
- sendRC=True, timeout=self.timeout)
- self.command = c
- d = c.start()
- return d
-
- def interrupt(self):
- self.interrupted = True
- self.command.kill('command interrupted')
-
-
class cmd_bot(Command):
doc = _('Control buildbot slave')
@@ -167,14 +124,6 @@
return build.build()
def start(self, config):
- from buildbot.slave.registry import registerSlaveCommand
- from buildbot.slave.commands import Command as BuildBotCommand
-
- JhBuildbotCommand.jhbuildrc = config.filename
- JhBuildbotCommand.__bases__ = (BuildBotCommand,)
-
- registerSlaveCommand('jhbuild', JhBuildbotCommand, 0.1)
-
from twisted.application import service
application = service.Application('buildslave')
if ':' in config.jhbuildbot_master:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]