Bug 1645769 [wpt PR 24148] - Fix the artifact path for geckodriver downloads, a=testonly
authorJames Graham <james@hoppipolla.co.uk>
Mon, 22 Jun 2020 10:38:55 +0000
changeset 536786 f6a078f8fde0aaa5a5fd900fa65a86a7c6d3b1ee
parent 536785 5ec19281cce954fab8919966017dae08cee0ebe2
child 536787 0a10e5e4df7e47c670baee94110c49322a858e00
push id37533
push userdluca@mozilla.com
push dateTue, 23 Jun 2020 21:38:40 +0000
treeherdermozilla-central@d48aa0f0aa0b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1645769, 24148
milestone79.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 1645769 [wpt PR 24148] - Fix the artifact path for geckodriver downloads, a=testonly Automatic update from web-platform-tests Fix the artifact path for geckodriver downloads -- Ouptut geckodriver version to logs -- wpt-commits: d56e220f7e29d687713a7e3ad2ac3e09fcc4b0b6, 0cec9450e6701def8bddf3705f7dec8c9a30d8f2 wpt-pr: 24148
testing/web-platform/tests/tools/wpt/browser.py
--- a/testing/web-platform/tests/tools/wpt/browser.py
+++ b/testing/web-platform/tests/tools/wpt/browser.py
@@ -397,43 +397,48 @@ class Firefox(Browser):
         assert latest_release != (0,0,0)
         return "v%s.%s.%s" % tuple(str(item) for item in latest_release)
 
     def install_webdriver(self, dest=None, channel=None, browser_binary=None):
         """Install latest Geckodriver."""
         if dest is None:
             dest = os.getcwd()
 
+        path = None
         if channel == "nightly":
             path = self.install_geckodriver_nightly(dest)
-            if path is not None:
-                return path
-            else:
+            if path is None:
                 self.logger.warning("Nightly webdriver not found; falling back to release")
 
-        version = self._latest_geckodriver_version()
-        format = "zip" if uname[0] == "Windows" else "tar.gz"
-        self.logger.debug("Latest geckodriver release %s" % version)
-        url = ("https://github.com/mozilla/geckodriver/releases/download/%s/geckodriver-%s-%s.%s" %
-               (version, version, self.platform_string_geckodriver(), format))
-        if format == "zip":
-            unzip(get(url).raw, dest=dest)
-        else:
-            untar(get(url).raw, dest=dest)
-        return find_executable(os.path.join(dest, "geckodriver"))
+        if path is None:
+            version = self._latest_geckodriver_version()
+            format = "zip" if uname[0] == "Windows" else "tar.gz"
+            self.logger.debug("Latest geckodriver release %s" % version)
+            url = ("https://github.com/mozilla/geckodriver/releases/download/%s/geckodriver-%s-%s.%s" %
+                   (version, version, self.platform_string_geckodriver(), format))
+            if format == "zip":
+                unzip(get(url).raw, dest=dest)
+            else:
+                untar(get(url).raw, dest=dest)
+            path = find_executable(os.path.join(dest, "geckodriver"))
+
+        assert path is not None
+        self.logger.info("Installed %s" %
+                         subprocess.check_output([path, "--version"]).splitlines()[0])
+        return path
 
     def install_geckodriver_nightly(self, dest):
         self.logger.info("Attempting to install webdriver from nightly")
 
         platform_bits = ("64" if uname[4] == "x86_64" else
                          ("32" if self.platform == "win" else ""))
         tc_platform = "%s%s" % (self.platform, platform_bits)
 
         archive_ext = ".zip" if uname[0] == "Windows" else ".tar.gz"
-        archive_name = "public/geckodriver%s" % archive_ext
+        archive_name = "public/build/geckodriver%s" % archive_ext
 
         try:
             resp = get_taskcluster_artifact(
                 "gecko.v2.mozilla-central.latest.geckodriver.%s" % tc_platform,
                 archive_name)
         except Exception:
             self.logger.info("Geckodriver download failed")
             return