# HG changeset patch # User Jeff Hammel # Date 1294789166 28800 # Node ID 7493ba72cce737f1276363dc9b88d77875768cc0 # Parent 6a79522282c3871192a6c2d48fed274586c5e0b9 * use absolute paths for finding (works in unix bash) diff -r 6a79522282c3 -r 7493ba72cce7 autobot/process/factory.py --- a/autobot/process/factory.py Tue Jan 11 15:23:36 2011 -0800 +++ b/autobot/process/factory.py Tue Jan 11 15:39:26 2011 -0800 @@ -12,14 +12,14 @@ """ returns a command to echo the found file cross-platform """ - args = ['[ -e "%s" ]; then echo "%s"' % (arg, arg) for arg in args] + args = ['[ -e "%s" ]; then echo "${PWD}/%s"' % (arg, arg) for arg in args] command = 'if %s; else false; fi' % '; elif '.join(args) return ['bash', '-c', command] class VirtualenvFactory(BuildFactory): """ - create a virtualenv + create a virtualenv and install some python packages in it """ def __init__(self, name='env', hg_sources=(), git_sources=()): @@ -42,15 +42,11 @@ command=find('Scripts', 'bin'), workdir=WithProperties('%(virtualenv)s'))) self.findScript('python') -# self.addStep(SetProperty(property='python', -# workdir=WithProperties('%(virtualenv)s/%(scripts)s'), -# command=find('python', 'python.exe'))) # add a source directory self.addStep(ShellCommand(command=['mkdir', '-p', 'src'], workdir=WithProperties('%(virtualenv)s'))) - # clone hg repositories for hg_source in hg_sources: self.addStep(ShellCommand(command=['hg', 'clone', hg_source], @@ -70,7 +66,7 @@ """ self.addStep(SetProperty(property=script, command=find(script, script + '.exe'), - workdir=WithProperties('%(virtualenv)s/%(scripts)s'))) + workdir=WithProperties('%(scripts)s'))) diff -r 6a79522282c3 -r 7493ba72cce7 autobot/projects/autobot/__init__.py --- a/autobot/projects/autobot/__init__.py Tue Jan 11 15:23:36 2011 -0800 +++ b/autobot/projects/autobot/__init__.py Tue Jan 11 15:39:26 2011 -0800 @@ -12,5 +12,9 @@ PythonSourceFactory.__init__(self, name='autobot', hg_sources=['http://k0s.org/mozilla/hg/autobot']) - # run the tests - + # find the template + self.findScript('create-autobot') + + # make sure the template actually does something + self.addStep(ShellCommand([WithProperties('%(create-autobot)s'), + '--list-factories'])