Bug 1525327 - Don't crash wptrunner if mozversion fails, r=ato
authorJames Graham <james@hoppipolla.co.uk>
Fri, 01 Feb 2019 17:32:05 +0000
changeset 458202 6ab9304b1048371044dc8b56e1e6669334735cd6
parent 458201 d3d51acadf5d6f4cd79e0d38692482a5d8968c37
child 458203 c983e907bbfdb768b3745b2ba6616469880e3a84
push id35518
push useropoprus@mozilla.com
push dateFri, 08 Feb 2019 09:55:14 +0000
treeherdermozilla-central@3a3e393396f4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersato
bugs1525327
milestone67.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 1525327 - Don't crash wptrunner if mozversion fails, r=ato On Android we aren't necessarily passing in the package path, so mozversion can't extract the relevant metadata, and on other platforms it could also fail if we pass in a script file or similar. In that case we shouldn't fail. Differential Revision: https://phabricator.services.mozilla.com/D18712
testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
--- a/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
+++ b/testing/web-platform/tests/tools/wptrunner/wptrunner/browsers/firefox.py
@@ -158,17 +158,20 @@ def run_info_extras(**kwargs):
           "verify": kwargs["verify"],
           "headless": "MOZ_HEADLESS" in os.environ,
           "sw-e10s": get_bool_pref("dom.serviceWorkers.parent_intercept")}
     rv.update(run_info_browser_version(kwargs["binary"]))
     return rv
 
 
 def run_info_browser_version(binary):
-    version_info = mozversion.get_version(binary)
+    try:
+        version_info = mozversion.get_version(binary)
+    except mozversion.errors.VersionError:
+        version_info = None
     if version_info:
         return {"browser_build_id": version_info.get("application_buildid", None),
                 "browser_changeset": version_info.get("application_changeset", None)}
     return {}
 
 
 def update_properties():
     return (["debug", "webrender", "e10s", "os", "version", "processor", "bits"],