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 438299 7444086c2a4df4c28a89176462d03e0c3e2b2ea9
parent 438298 1d905b01094e7e8b0acfcb7c4b49f17a41e644cc
child 438300 3c7202df78b4e6515085fbeb702ff82d6f8552a2
push id35679
push userbmo:timdream@gmail.com
push dateMon, 14 Nov 2016 09:29:38 +0000
reviewersjmaher
bugs1316667
milestone52.0a1
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
testing/web-platform/mach_commands.py
--- 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:
             sys.path.append(build_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")