changeset 38:f586e28ff3d7

now have a testable setup; doesnt do much yet
author Jeff Hammel <jhammel@mozilla.com>
date Sat, 08 Jan 2011 16:48:32 -0800
parents b41f50162908
children 98fa7d1a7b1d
files autobot/process/factory.py autobot/projects/__init__.py autobot/steps/virtualenv.py autobot/template/master/master.cfg
diffstat 4 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/autobot/process/factory.py	Sat Jan 08 11:06:57 2011 -0800
+++ b/autobot/process/factory.py	Sat Jan 08 16:48:32 2011 -0800
@@ -17,9 +17,10 @@
     - hg_sources : sources of python packages with setuptools setup.pys
     """
     BuildFactory.__init__(self)
+
     self.addStep(CreateVirtualenv(name))
     self.addStep(ShellCommand(command=['mkdir', 'src'],
-                              directory=name))
+                              workdir=name))
     # TODO: set properities:
     # - python location
     # - virtualenv location
@@ -27,12 +28,12 @@
     # clone hg repositories
     for hg_source in hg_sources:
       self.addStep(ShellCommand(command=['hg', 'clone', hg_source],
-                                directory=name + '/src'))
+                                workdir=name+'/src'))
 
     # clone the git repositories
     for git_source in git_sources:
       self.addStep(ShellCommand(command=['git', 'clone', git_source],
-                                directory=name + '/src'))
+                                workdir=name+'/src'))
 
 class PythonSourceFactory(VirtualenvFactory):
   """
--- a/autobot/projects/__init__.py	Sat Jan 08 11:06:57 2011 -0800
+++ b/autobot/projects/__init__.py	Sat Jan 08 16:48:32 2011 -0800
@@ -24,5 +24,5 @@
             if os.path.exists(os.path.join(package, '__init__.py'))]
 
 # available factories
-factories = {'logparser': TestLogParserFactory(),
-             'mozmill':   TestMozmillFactory() }
+factories = {'logparser': TestLogParserFactory,
+             'mozmill':   TestMozmillFactory }
--- a/autobot/steps/virtualenv.py	Sat Jan 08 11:06:57 2011 -0800
+++ b/autobot/steps/virtualenv.py	Sat Jan 08 16:48:32 2011 -0800
@@ -5,6 +5,7 @@
   """create a virtualenv"""
   # XXX needs to have virtualenv installed (on the slave)
 
-  def __init__(self, directory):
-    command = ['virtualenv', WithProperties(directory)]
-    ShellCommand.__init__(self, command=command)
+  def __init__(self, directory, **kw):
+    ShellCommand.__init__(self, **kw)
+    self.addFactoryArguments(directory=directory)
+    self.command = ['virtualenv', WithProperties(directory)]
--- a/autobot/template/master/master.cfg	Sat Jan 08 11:06:57 2011 -0800
+++ b/autobot/template/master/master.cfg	Sat Jan 08 16:48:32 2011 -0800
@@ -22,7 +22,7 @@
 
 # define builder factory
 from autobot.projects import factories
-f1 = factories['{{factory}}']
+f1 = factories['{{factory}}']()
 
 # define builder
 b1 = {'name': "buildbot-full",