Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
Merge default->production
Browse files Browse the repository at this point in the history
--HG--
branch : production
  • Loading branch information
Armen Zambrano Gasparnian committed Feb 15, 2013
2 parents 8686267 + f8570c1 commit 57ce767
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 7 deletions.
25 changes: 21 additions & 4 deletions scripts/b2g_build.py
Expand Up @@ -90,6 +90,10 @@ class B2GBuild(LocalesMixin, MockMixin, BaseScript, VCSMixin, TooltoolMixin, Tra
"dest": "variant", "dest": "variant",
"help": "b2g build variant. overrides gecko config's value", "help": "b2g build variant. overrides gecko config's value",
}], }],
[["--checkout-revision"], {
"dest": "checkout_revision",
"help": "checkout a specific gecko revision.",
}],
[["--additional-source-tarballs"], { [["--additional-source-tarballs"], {
"action": "extend", "action": "extend",
"type": "string", "type": "string",
Expand Down Expand Up @@ -350,15 +354,28 @@ def clobber(self):
super(B2GBuild, self).clobber() super(B2GBuild, self).clobber()


def checkout_gecko(self): def checkout_gecko(self):
'''
If you want a different revision of gecko to be used you can use the
--checkout-revision flag. This is necessary for trees that are not
triggered by a gecko commit but by an external tree (like gaia).
'''
dirs = self.query_abs_dirs() dirs = self.query_abs_dirs()


# Make sure the parent directory to gecko exists so that 'hg share ... # Make sure the parent directory to gecko exists so that 'hg share ...
# build/gecko' works # build/gecko' works
self.mkdir_p(os.path.dirname(dirs['src'])) self.mkdir_p(os.path.dirname(dirs['src']))


repo = self.query_repo() repo = self.query_repo()
rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.query_revision()) if self.config.has_key("checkout_revision"):
self.set_buildbot_property('revision', rev, write_to_file=True) rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.config["checkout_revision"])
# in this case, self.query_revision() will be returning the "revision" that triggered the job
# we know that it is not a gecko revision that did so
self.set_buildbot_property('revision', self.query_revision(), write_to_file=True)
else:
# a gecko revision triggered this job; self.query_revision() will return it
rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.query_revision())
self.set_buildbot_property('revision', rev, write_to_file=True)
self.set_buildbot_property('gecko_revision', rev, write_to_file=True)


def download_gonk(self): def download_gonk(self):
c = self.config c = self.config
Expand Down Expand Up @@ -565,13 +582,13 @@ def update_source_manifest(self):
if 'Gonk specific things' in line: if 'Gonk specific things' in line:
new_sources.append(' <!-- Mercurial-Information: <remote fetch="http://hg.mozilla.org/" name="hgmozillaorg"> -->') new_sources.append(' <!-- Mercurial-Information: <remote fetch="http://hg.mozilla.org/" name="hgmozillaorg"> -->')
new_sources.append(' <!-- Mercurial-Information: <project name="%s" path="gecko" remote="hgmozillaorg" revision="%s"/> -->' % new_sources.append(' <!-- Mercurial-Information: <project name="%s" path="gecko" remote="hgmozillaorg" revision="%s"/> -->' %
(self.buildbot_config['properties']['repo_path'], self.buildbot_properties['revision'])) (self.buildbot_config['properties']['repo_path'], self.buildbot_properties['gecko_revision']))
new_sources.append(' <!-- Mercurial-Information: <project name="%s" path="gaia" remote="hgmozillaorg" revision="%s"/> -->' % new_sources.append(' <!-- Mercurial-Information: <project name="%s" path="gaia" remote="hgmozillaorg" revision="%s"/> -->' %
(gaia_config['repo'].replace('http://hg.mozilla.org/', ''), self.buildbot_properties['gaia_revision'])) (gaia_config['repo'].replace('http://hg.mozilla.org/', ''), self.buildbot_properties['gaia_revision']))


if self.query_do_translate_hg_to_git(): if self.query_do_translate_hg_to_git():
url = manifest_config['translate_base_url'] url = manifest_config['translate_base_url']
gecko_git = self.query_translated_revision(url, 'gecko', self.buildbot_properties['revision']) gecko_git = self.query_translated_revision(url, 'gecko', self.buildbot_properties['gecko_revision'])
gaia_git = self.query_translated_revision(url, 'gaia', self.buildbot_properties['gaia_revision']) gaia_git = self.query_translated_revision(url, 'gaia', self.buildbot_properties['gaia_revision'])
new_sources.append(' <project name="%s" path="gecko" remote="mozillaorg" revision="%s"/>' % ("https://git.mozilla.org/releases/gecko.git".replace(git_base_url, ''), gecko_git)) new_sources.append(' <project name="%s" path="gecko" remote="mozillaorg" revision="%s"/>' % ("https://git.mozilla.org/releases/gecko.git".replace(git_base_url, ''), gecko_git))
new_sources.append(' <project name="%s" path="gaia" remote="mozillaorg" revision="%s"/>' % ("https://git.mozilla.org/releases/gaia.git".replace(git_base_url, ''), gaia_git)) new_sources.append(' <project name="%s" path="gaia" remote="mozillaorg" revision="%s"/>' % ("https://git.mozilla.org/releases/gaia.git".replace(git_base_url, ''), gaia_git))
Expand Down
6 changes: 3 additions & 3 deletions scripts/desktop_unittest.py
Expand Up @@ -33,23 +33,23 @@ class DesktopUnittest(TestingMixin, MercurialScript):


config_options = [ config_options = [
[['--mochitest-suite', ], { [['--mochitest-suite', ], {
"action": "append", "action": "extend",
"dest": "specified_mochitest_suites", "dest": "specified_mochitest_suites",
"type": "string", "type": "string",
"help": "Specify which mochi suite to run. " "help": "Specify which mochi suite to run. "
"Suites are defined in the config file.\n" "Suites are defined in the config file.\n"
"Examples: 'all', 'plain1', 'plain5', 'chrome', or 'a11y'"} "Examples: 'all', 'plain1', 'plain5', 'chrome', or 'a11y'"}
], ],
[['--reftest-suite', ], { [['--reftest-suite', ], {
"action": "append", "action": "extend",
"dest": "specified_reftest_suites", "dest": "specified_reftest_suites",
"type": "string", "type": "string",
"help": "Specify which reftest suite to run. " "help": "Specify which reftest suite to run. "
"Suites are defined in the config file.\n" "Suites are defined in the config file.\n"
"Examples: 'all', 'crashplan', or 'jsreftest'"} "Examples: 'all', 'crashplan', or 'jsreftest'"}
], ],
[['--xpcshell-suite', ], { [['--xpcshell-suite', ], {
"action": "append", "action": "extend",
"dest": "specified_xpcshell_suites", "dest": "specified_xpcshell_suites",
"type": "string", "type": "string",
"help": "Specify which xpcshell suite to run. " "help": "Specify which xpcshell suite to run. "
Expand Down

0 comments on commit 57ce767

Please sign in to comment.