Bug 1462292 [wpt PR 11041] - Handle the case where git is missing when using vcs.GitTree., a=testonly
authorJames Graham <james@hoppipolla.co.uk>
Sat, 19 May 2018 21:07:04 +0000
changeset 419111 b9295cdf0c1ffb496d1b6b961929d4e86a021076
parent 419110 cdb3fe7b1c3315ed119e2c91c33c6684a767095d
child 419112 309128ccbee64f7e830abc6ee722bfbc01b25513
push id34026
push userapavel@mozilla.com
push dateMon, 21 May 2018 09:47:33 +0000
treeherdermozilla-central@dc1868d255be [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1462292, 11041
milestone62.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1462292 [wpt PR 11041] - Handle the case where git is missing when using vcs.GitTree., a=testonly Automatic update from web-platform-testsHandle the case where git is missing when using vcs.GitTree. -- wpt-commits: a152a6c24ba204d02833b91a6a9546fac575e5c1 wpt-pr: 11041
testing/web-platform/tests/tools/wptrunner/wptrunner/vcs.py
testing/web-platform/tests/tools/wptrunner/wptrunner/wpttest.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/vcs.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/vcs.py
@@ -22,16 +22,20 @@ def vcs(bin_name):
         proc_kwargs = {}
         if repo is not None:
             proc_kwargs["cwd"] = repo
 
         command_line = [bin_name, command] + args
         logger.debug(" ".join(command_line))
         try:
             return subprocess.check_output(command_line, stderr=subprocess.STDOUT, **proc_kwargs)
+        except OSError as e:
+            if log_error:
+                logger.error(e)
+            raise
         except subprocess.CalledProcessError as e:
             if log_error:
                 logger.error(e.output)
             raise
     return inner
 
 git = vcs("git")
 hg = vcs("hg")
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/wpttest.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/wpttest.py
@@ -70,17 +70,17 @@ class RunInfo(dict):
         import mozinfo
         self._update_mozinfo(metadata_root)
         self.update(mozinfo.info)
 
         from update.tree import GitTree
         try:
             # GitTree.__init__ throws if we are not in a git tree.
             rev = GitTree(log_error=False).rev
-        except subprocess.CalledProcessError:
+        except (OSError, subprocess.CalledProcessError):
             rev = None
         if rev:
             self["revision"] = rev
 
         self["product"] = product
         if debug is not None:
             self["debug"] = debug
         elif "debug" not in self: