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:
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")