Mercurial > hg > autobot
changeset 229:9513d73e0792
autobot tests now work
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 29 Nov 2011 20:39:45 -0800 |
parents | d8172a7ba4b2 |
children | 1084dadf9027 |
files | autobot/process/factory.py autobot/projects/mozbase/__init__.py |
diffstat | 2 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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')}))