# HG changeset patch # User Jeff Hammel # Date 1294868735 28800 # Node ID 1a0110f00e7ef37f57e3093205c458f943af4ab5 # Parent 2de829d2c3f79989efe3faa49a47e2a2c461b737 basic test for autobot diff -r 2de829d2c3f7 -r 1a0110f00e7e autobot/projects/autobot/__init__.py --- a/autobot/projects/autobot/__init__.py Wed Jan 12 13:02:24 2011 -0800 +++ b/autobot/projects/autobot/__init__.py Wed Jan 12 13:45:35 2011 -0800 @@ -12,9 +12,47 @@ PythonSourceFactory.__init__(self, name='autobot', hg_sources=['http://k0s.org/mozilla/hg/autobot']) - # find the template + # find the necessary scripts self.findScript('create-autobot') + self.findScript('buildbot') + self.findScript('buildslave') + + # make sure the template creator actually does something + self.addStep(ShellCommand(command=[WithProperties('%(create-autobot)s'), + '--list-factories'], + description='create-autobot --list-factories')) + + # make a master, slave pair + self.addStep(ShellCommand(command=[WithProperties('%(create-autobot)s'), + '-f', '-', # all factories, + 'bot'] + description="make an autobot", + workdir=WithProperties('%(virtualenv)s'))) + + - # make sure the template actually does something - self.addStep(ShellCommand(command=[WithProperties('%(create-autobot)s'), - '--list-factories'])) + # make sure they start + self.addStep(ShellCommand(command=[WithProperties('%(buildbot)s'), + 'start', 'master'], + workdir=WithProperties('%(virtualenv)s/bot'), + description='start build master')) + self.addStep(ShellCommand(command=[WithProperties('%(buildslave)s'), + 'start', 'slave'], + workdir=WithProperties('%(virtualenv)s/bot'), + description='start build slave')) + + + # try to access the waterfall + self.addStep(ShellCommand(command=['curl', 'http://localhost:8010/'])) + + # could try to actually build + + # stop them! + self.addStep(ShellCommand(command=[WithProperties('%(buildbot)s'), + 'stop', 'master'], + workdir=WithProperties('%(virtualenv)s/bot'), + description='stop build master')) + self.addStep(ShellCommand(command=[WithProperties('%(buildslave)s'), + 'stop', 'slave'], + workdir=WithProperties('%(virtualenv)s/bot'), + description='stop build slave'))