Bug 1316667 - Use a path that exists when resolving stackfix dir, r=jmaher draft
authorJames Graham <james@hoppipolla.co.uk>
Fri, 11 Nov 2016 18:09:22 +0000
changeset 437846 cc15b54c3237b5e9ce95fb21c4ad8f7e4a1767a8
parent 437845 60031ad275cc7ffff4bbc0ba9b75bc6255ef230e
child 536735 983edd516bc7f1ec26fe8227b4e172ed31ba9525
push id35522
push userbmo:james@hoppipolla.co.uk
push dateFri, 11 Nov 2016 18:10:52 +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")