Mercurial > hg > autobot
changeset 226:dd5ab8b3d94b
stub mozbase thingy; does not yet work
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Tue, 29 Nov 2011 16:02:58 -0800 |
parents | e4ba2231c36e |
children | 90f4028d9455 |
files | autobot/process/factory.py autobot/projects/mozbase/__init__.py |
diffstat | 2 files changed, 8 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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] -