changeset 92:1a0110f00e7e

basic test for autobot
author Jeff Hammel <jhammel@mozilla.com>
date Wed, 12 Jan 2011 13:45:35 -0800
parents 2de829d2c3f7
children 91f2db6e0291
files autobot/projects/autobot/__init__.py
diffstat 1 files changed, 42 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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'))