Bug 1316667 - Use a path that exists when resolving stackfix dir, r=jmaher
authorJames Graham <james@hoppipolla.co.uk>
Fri, 11 Nov 2016 18:09:22 +0000
changeset 352241 7444086c2a4df4c28a89176462d03e0c3e2b2ea9
parent 352240 1d905b01094e7e8b0acfcb7c4b49f17a41e644cc
child 352242 3c7202df78b4e6515085fbeb702ff82d6f8552a2
push id6795
push userjlund@mozilla.com
push dateMon, 23 Jan 2017 14:19:46 +0000
treeherdermozilla-esr52@76101b503191 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
Bug 1316667 - Use a path that exists when resolving stackfix dir, r=jmaher This fixes a bug on Windows where we try to append .exe to the path and so get an invalid, non-existing path by using the Fx binary as the path and then stripping off the filename. MozReview-Commit-ID: 8EWGGcz40iw
--- a/testing/web-platform/mach_commands.py
+++ b/testing/web-platform/mach_commands.py
@@ -34,27 +34,28 @@ class WebPlatformTestsRunner(MozbuildObj
         build_path = os.path.join(self.topobjdir, 'build')
         if build_path not in sys.path:
         if kwargs["config"] is None:
             kwargs["config"] = os.path.join(self.topsrcdir, 'testing', 'web-platform', 'wptrunner.ini')
         if kwargs["binary"] is None:
-            kwargs["binary"] = self.get_binary_path('app')
+            kwargs["binary"] = self.get_binary_path()
         if kwargs["prefs_root"] is None:
             kwargs["prefs_root"] = os.path.join(self.topobjdir, '_tests', 'web-platform', "prefs")
-        if kwargs["stackfix_dir"] is None:
-            kwargs["stackfix_dir"] = self.get_binary_path("")
         if kwargs["certutil_binary"] is None:
             kwargs["certutil_binary"] = self.get_binary_path('certutil')
+        if kwargs["stackfix_dir"] is None:
+            kwargs["stackfix_dir"] = os.path.split(
+                self.get_binary_path(validate_exists=False))[0]
         here = os.path.split(__file__)[0]
         if kwargs["ssl_type"] in (None, "pregenerated"):
             if kwargs["ca_cert_path"] is None:
                 kwargs["ca_cert_path"] = os.path.join(here, "certs", "cacert.pem")
             if kwargs["host_key_path"] is None:
                 kwargs["host_key_path"] = os.path.join(here, "certs", "web-platform.test.key")