Mercurial > hg > autobot
changeset 22:a7e2f5b2a7e9
stub out a combined template for the master + slave
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Fri, 07 Jan 2011 17:07:02 -0800 |
parents | 6c3c6488e4a9 |
children | a32a7055f3e6 |
files | autobot/template.py |
diffstat | 1 files changed, 22 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/autobot/template.py Fri Jan 07 16:39:13 2011 -0800 +++ b/autobot/template.py Fri Jan 07 17:07:02 2011 -0800 @@ -67,6 +67,25 @@ print ' '.join(command) call(command) +class AutobotTemplate(MakeItSoTemplate): + name = 'autobot' + description = 'template for the autotools buildbot master+slave' + templates = ['template'] + def __init__(self, **kwargs): + + # get the variables + # TODO: move this upstream + names = set() + for variable in AutobotMasterTemplate.vars: + names.add(variable.name) + self.vars.append(variable.copy()) + for variable in AutobotSlaveTemplate.vars: + if variable.name not in names: + self.vars.append(variable.copy()) + MakeitSoTemplate.__init__(self, **kwargs) + + + # CLI front end functions # (console_script entry points) @@ -81,7 +100,9 @@ template.substitute() def create_autobot(args=sys.argv[1:]): - raise NotImpmenetedError + cli = MakeItSoCLI(AutobotSlaveTemplate) + template = cli.parse() + template.substitute() if __name__ == '__main__': create_master()