# HG changeset patch # User Jeff Hammel # Date 1322627985 28800 # Node ID 9513d73e07922d32fac019e31614fd9175ad7f6f # Parent d8172a7ba4b2b8553ca452e1ce43c7edaac2fcd4 autobot tests now work diff -r d8172a7ba4b2 -r 9513d73e0792 autobot/process/factory.py --- a/autobot/process/factory.py Tue Nov 29 20:05:54 2011 -0800 +++ b/autobot/process/factory.py Tue Nov 29 20:39:45 2011 -0800 @@ -251,6 +251,13 @@ command=find(script, script + '.exe'), workdir=WithProperties('%(scripts)s'))) + def addScripts(self): + """ + add the scripts directory to the $PATH + """ + self.addStep(SetProperty(property='PATH', + command=WithProperties('echo %(scripts)s:$PATH'))) + class PythonSourceFactory(VirtualenvFactory): """ setup several python packages diff -r d8172a7ba4b2 -r 9513d73e0792 autobot/projects/mozbase/__init__.py --- a/autobot/projects/mozbase/__init__.py Tue Nov 29 20:05:54 2011 -0800 +++ b/autobot/projects/mozbase/__init__.py Tue Nov 29 20:39:45 2011 -0800 @@ -14,7 +14,12 @@ def __init__(self, platform=None): VirtualenvFactory.__init__(self) - # checkout the repositories - self.checkout() + # setup for development + self.addStep(ShellCommand(command=[WithProperties('%(python)s'), 'setup_development.py'], workdir=WithProperties('%(virtualenv)s/src/mozbase'))) - # run the tests [TODO] + # add %(scripts)s to $PATH + self.addScripts() + + # run the tests + self.addStep(ShellCommand(command=[WithProperties('%(python)s'), 'test.py'], workdir=WithProperties('%(virtualenv)s/src/mozbase'), + env={'PATH': WithProperties('%(PATH)s')}))