# HG changeset patch # User Jeff Hammel # Date 1322611378 28800 # Node ID dd5ab8b3d94bf068d7bb804b0f93ec8badfed6bc # Parent e4ba2231c36e36208b4a53a46dcba38ac56ac21a stub mozbase thingy; does not yet work diff -r e4ba2231c36e -r dd5ab8b3d94b autobot/process/factory.py --- a/autobot/process/factory.py Tue Nov 29 15:52:38 2011 -0800 +++ b/autobot/process/factory.py Tue Nov 29 16:02:58 2011 -0800 @@ -115,8 +115,6 @@ # code islands self.addStep(SetProperty(property='firefox', command=self.abspath(WithProperties('firefox/%(app_name)s/Contents/MacOS/firefox-bin')))) - - else: raise NotImplementedError("FirefoxDownloader doesn't know how to work with your os: %s" % platform['os']) @@ -155,7 +153,6 @@ branch = None if '#' in source: source, branch = source.rsplit('#', 1) - else: source, branch = source if branch is None: @@ -184,7 +181,7 @@ **kwargs)) if branch and branch != 'master': dirname = self.dirname('git', git_source) - self.addStep(ShellCommand(command=['git', '--git-dir', dirname + '/.git', + self.addStep(ShellCommand(command=['git', '--git-dir', dirname + '/.git', '--work-tree', dirname, 'checkout', branch], **kwargs)) @@ -202,7 +199,8 @@ return repo.rstrip('/').rsplit('/')[-1] else: raise NotImplementedError("Unknown repository type: %s" % type) - + + class VirtualenvFactory(SourceFactory): """ create a virtualenv and install some python packages in it diff -r e4ba2231c36e -r dd5ab8b3d94b autobot/projects/mozbase/__init__.py --- a/autobot/projects/mozbase/__init__.py Tue Nov 29 15:52:38 2011 -0800 +++ b/autobot/projects/mozbase/__init__.py Tue Nov 29 16:02:58 2011 -0800 @@ -2,20 +2,19 @@ from buildbot.steps.shell import ShellCommand from buildbot.steps.shell import WithProperties -class TestMozbase(SourceFactory): +class TestMozbase(VirtualenvFactory): """ Base utilties for mozilla test harnesses: https://github.com/mozilla/mozbase """ - sources = {'hg': ['https://github.com/mozilla/mozbase'], - 'git': []} - + sources = {'git': ['https://github.com/mozilla/mozbase'], + 'hg': []} + def __init__(self, platform=None): - SourceFactory.__init__(self, platform=platform) + SourceFactory.__init__(self) # checkout the repositories self.checkout() # run the tests [TODO] -