Merging default -> production production FIREFOX_24_5_0esr_BUILD1 FIREFOX_24_5_0esr_RELEASE
authorJordan Lund <jlund@mozilla.com>
Mon, 21 Apr 2014 09:47:40 -0700
branchproduction
changeset 2667 c9615cf1645a348cd2da8ae3be8635e0f3e25176
parent 2666 a623c5a962b5d5cce036276b5a8ea7ac9aa015cc (current diff)
parent 2665 850e440da92005184e35e798c3b1fa76b2713673 (diff)
child 2669 bbf17fec21c5ad39c6262dd3ac49933a553ba5b4
push id1967
push userjlund@mozilla.com
push dateMon, 21 Apr 2014 16:47:53 +0000
bugs986209, 991393, 987406
Merging default -> production changeset: 2659:68dc075549a2 parent: 2657:083760295cd5 user: Aki Sasaki <asasaki@mozilla.com> date: Thu Apr 17 17:10:12 2014 -0700 summary: bug 986209 - gaia-try support. r=jgriffin changeset: 2661:6121b5c47eb3 parent: 2659:68dc075549a2 user: Aki Sasaki <asasaki@mozilla.com> date: Fri Apr 18 11:03:19 2014 -0700 summary: bug 991393 - flame b2g bumper on 1.3 and 1.4. r=hwine changeset: 2663:d92a223fe008 parent: 2661:6121b5c47eb3 user: Jonathan Griffin <jgriffin@mozilla.com> date: Fri Apr 18 11:11:53 2014 -0700 summary: Bug 987406 - Set up certificate_path processing, r=aki changeset: 2665:850e440da920 parent: 2663:d92a223fe008 user: Aki Sasaki <asasaki@mozilla.com> date: Fri Apr 18 13:46:52 2014 -0700 summary: bug 991393 - stop bumping flame until there's a manifest. r=bustage
new file mode 100644
--- /dev/null
+++ b/configs/b2g/gaia_try.py
@@ -0,0 +1,3 @@
+config = {
+    "gaia_json_path": "{repo_path}/raw-file/{revision}/gaia.json",
+}
--- a/mozharness/mozilla/gaia.py
+++ b/mozharness/mozilla/gaia.py
@@ -24,24 +24,25 @@ class GaiaMixin(object):
         use_gaia_json: if True, the repo parameter is used to retrieve
               a gaia.json file from a gecko repo, which in turn is used to
               clone gaia; if False, repo represents a gaia repo to clone.
         """
 
         repo_path = repo.get('repo_path')
         revision = repo.get('revision')
         branch = repo.get('branch')
+        gaia_json_path = self.config.get("gaia_json_path", "{repo_path}/raw-file/{revision}/b2g/config/gaia.json")
         git = False
 
-        print 'dest', dest
+        self.info('dest: %s' % dest)
 
         if use_gaia_json:
-            url = "{repo_path}/raw-file/{revision}/b2g/config/gaia.json".format(
-                  repo_path=repo_path,
-                  revision=revision)
+            url = gaia_json_path.format(
+                repo_path=repo_path,
+                revision=revision)
             contents = self.retry(self.load_json_from_url, args=(url,))
             if contents.get('git') and contents['git'].get('remote'):
                 git = True
                 remote = contents['git']['remote']
                 branch = contents['git'].get('branch')
                 revision = contents['git'].get('git_revision')
                 if not (branch or revision):
                     self.fatal('Must specify branch or revision for git repo')
@@ -51,17 +52,17 @@ class GaiaMixin(object):
                 branch = None
 
         if git:
             git_cmd = self.query_exe('git')
             needs_clobber = True
 
             if os.path.exists(dest) and os.path.exists(os.path.join(dest, '.git')):
                 cmd = [git_cmd, 'remote', '-v']
-                output = self.get_output_from_command(cmd, cwd=os.path.dirname(dest))
+                output = self.get_output_from_command(cmd, cwd=dest)
                 for line in output:
                     if remote in line:
                         needs_clobber = False
 
             if needs_clobber:
                 self.rmtree(dest)
 
             # git clone
--- a/mozharness/mozilla/testing/testbase.py
+++ b/mozharness/mozilla/testing/testbase.py
@@ -116,45 +116,50 @@ class TestingMixin(VirtualenvMixin, Buil
     def postflight_read_buildbot_config(self):
         """
         Determine which files to download from the buildprops.json file
         created via the buildbot ScriptFactory.
         """
         if self.buildbot_config:
             c = self.config
             message = "Unable to set %s from the buildbot config"
+            if c.get("installer_url"):
+                self.installer_url = c['installer_url']
+            if c.get("test_url"):
+                self.test_url = c['test_url']
             try:
                 files = self.buildbot_config['sourcestamp']['changes'][-1]['files']
                 # Bug 868490 - Only require exactly two files if require_test_zip;
                 # otherwise accept either 1 or 2, since we'll be getting a
                 # test_zip url that we don't need.
                 expected_length = [1, 2, 3]
-                if c.get("require_test_zip"):
+                if c.get("require_test_zip") and not self.test_url:
                     expected_length = [2, 3]
                 actual_length = len(files)
                 if actual_length not in expected_length:
                     self.fatal("Unexpected number of files in buildbot config %s.\nExpected these number(s) of files: %s, but got: %d" %
                                (c['buildbot_json_path'], str(expected_length), actual_length))
                 for f in files:
                     if f['name'].endswith('tests.zip'):  # yuk
-                        # str() because of unicode issues on mac
-                        self.test_url = str(f['name'])
-                        self.info("Found test url %s." % self.test_url)
+                        if not self.test_url:
+                            # str() because of unicode issues on mac
+                            self.test_url = str(f['name'])
+                            self.info("Found test url %s." % self.test_url)
                     elif f['name'].endswith('crashreporter-symbols.zip'):  # yuk
                         self.symbols_url = str(f['name'])
                         self.info("Found symbols url %s." % self.symbols_url)
                     else:
-                        self.installer_url = str(f['name'])
-                        self.info("Found installer url %s." % self.installer_url)
-            except IndexError, e:
+                        if not self.installer_url:
+                            self.installer_url = str(f['name'])
+                            self.info("Found installer url %s." % self.installer_url)
+            except IndexError:
                 if c.get("require_test_zip"):
                     message = message % ("installer_url+test_url")
                 else:
                     message = message % ("installer_url")
-                self.fatal("%s: %s!" % (message, str(e)))
             missing = []
             if not self.installer_url:
                 missing.append("installer_url")
             if c.get("require_test_zip") and not self.test_url:
                 missing.append("test_url")
             if missing:
                 self.fatal("%s!" % (message % ('+'.join(missing))))
         else: