Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Merge default->production

--HG--
branch : production
  • Loading branch information...
commit 57ce767c340e38a43baed50a42c74610d6b2fa47 2 parents 8686267 + f8570c1
authored February 15, 2013
25  scripts/b2g_build.py
@@ -90,6 +90,10 @@ class B2GBuild(LocalesMixin, MockMixin, BaseScript, VCSMixin, TooltoolMixin, Tra
90 90
             "dest": "variant",
91 91
             "help": "b2g build variant. overrides gecko config's value",
92 92
         }],
  93
+        [["--checkout-revision"], {
  94
+            "dest": "checkout_revision",
  95
+            "help": "checkout a specific gecko revision.",
  96
+        }],
93 97
         [["--additional-source-tarballs"], {
94 98
             "action": "extend",
95 99
             "type": "string",
@@ -350,6 +354,11 @@ def clobber(self):
350 354
             super(B2GBuild, self).clobber()
351 355
 
352 356
     def checkout_gecko(self):
  357
+        '''
  358
+        If you want a different revision of gecko to be used you can use the
  359
+        --checkout-revision flag. This is necessary for trees that are not
  360
+        triggered by a gecko commit but by an external tree (like gaia).
  361
+        '''
353 362
         dirs = self.query_abs_dirs()
354 363
 
355 364
         # Make sure the parent directory to gecko exists so that 'hg share ...
@@ -357,8 +366,16 @@ def checkout_gecko(self):
357 366
         self.mkdir_p(os.path.dirname(dirs['src']))
358 367
 
359 368
         repo = self.query_repo()
360  
-        rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.query_revision())
361  
-        self.set_buildbot_property('revision', rev, write_to_file=True)
  369
+        if self.config.has_key("checkout_revision"):
  370
+            rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.config["checkout_revision"])
  371
+            # in this case, self.query_revision() will be returning the "revision" that triggered the job
  372
+            # we know that it is not a gecko revision that did so
  373
+            self.set_buildbot_property('revision', self.query_revision(), write_to_file=True)
  374
+        else:
  375
+            # a gecko revision triggered this job; self.query_revision() will return it
  376
+            rev = self.vcs_checkout(repo=repo, dest=dirs['src'], revision=self.query_revision())
  377
+            self.set_buildbot_property('revision', rev, write_to_file=True)
  378
+        self.set_buildbot_property('gecko_revision', rev, write_to_file=True)
362 379
 
363 380
     def download_gonk(self):
364 381
         c = self.config
@@ -565,13 +582,13 @@ def update_source_manifest(self):
565 582
             if 'Gonk specific things' in line:
566 583
                 new_sources.append('  <!-- Mercurial-Information: <remote fetch="http://hg.mozilla.org/" name="hgmozillaorg"> -->')
567 584
                 new_sources.append('  <!-- Mercurial-Information: <project name="%s" path="gecko" remote="hgmozillaorg" revision="%s"/> -->' %
568  
-                                   (self.buildbot_config['properties']['repo_path'], self.buildbot_properties['revision']))
  585
+                                   (self.buildbot_config['properties']['repo_path'], self.buildbot_properties['gecko_revision']))
569 586
                 new_sources.append('  <!-- Mercurial-Information: <project name="%s" path="gaia" remote="hgmozillaorg" revision="%s"/> -->' %
570 587
                                    (gaia_config['repo'].replace('http://hg.mozilla.org/', ''), self.buildbot_properties['gaia_revision']))
571 588
 
572 589
                 if self.query_do_translate_hg_to_git():
573 590
                     url = manifest_config['translate_base_url']
574  
-                    gecko_git = self.query_translated_revision(url, 'gecko', self.buildbot_properties['revision'])
  591
+                    gecko_git = self.query_translated_revision(url, 'gecko', self.buildbot_properties['gecko_revision'])
575 592
                     gaia_git = self.query_translated_revision(url, 'gaia', self.buildbot_properties['gaia_revision'])
576 593
                     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))
577 594
                     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))
6  scripts/desktop_unittest.py
@@ -33,7 +33,7 @@ class DesktopUnittest(TestingMixin, MercurialScript):
33 33
 
34 34
     config_options = [
35 35
         [['--mochitest-suite', ], {
36  
-            "action": "append",
  36
+            "action": "extend",
37 37
             "dest": "specified_mochitest_suites",
38 38
             "type": "string",
39 39
             "help": "Specify which mochi suite to run. "
@@ -41,7 +41,7 @@ class DesktopUnittest(TestingMixin, MercurialScript):
41 41
                     "Examples: 'all', 'plain1', 'plain5', 'chrome', or 'a11y'"}
42 42
          ],
43 43
         [['--reftest-suite', ], {
44  
-            "action": "append",
  44
+            "action": "extend",
45 45
             "dest": "specified_reftest_suites",
46 46
             "type": "string",
47 47
             "help": "Specify which reftest suite to run. "
@@ -49,7 +49,7 @@ class DesktopUnittest(TestingMixin, MercurialScript):
49 49
                     "Examples: 'all', 'crashplan', or 'jsreftest'"}
50 50
          ],
51 51
         [['--xpcshell-suite', ], {
52  
-            "action": "append",
  52
+            "action": "extend",
53 53
             "dest": "specified_xpcshell_suites",
54 54
             "type": "string",
55 55
             "help": "Specify which xpcshell suite to run. "

0 notes on commit 57ce767

Please sign in to comment.
Something went wrong with that request. Please try again.