fixup! [web-platform-tests] Try to set environment correctly for certutil on OSX
authorJames Graham <james@hoppipolla.co.uk>
Tue, 13 Jan 2015 21:57:37 +0000
changeset 326721 75c1a90ac5307a878104c52b029bfe9c4788b152
parent 326720 993bd92e2dfee529fb5497291ec896f39f58060c
child 326722 2eaca894da9d53ec33f846d50334dec8524bb8ad
push id10169
push userdminor@mozilla.com
push dateThu, 28 Jan 2016 13:10:48 +0000
milestone38.0a1
fixup! [web-platform-tests] Try to set environment correctly for certutil on OSX
testing/web-platform/harness/wptrunner/browsers/firefox.py
--- a/testing/web-platform/harness/wptrunner/browsers/firefox.py
+++ b/testing/web-platform/harness/wptrunner/browsers/firefox.py
@@ -188,17 +188,19 @@ class FirefoxBrowser(Browser):
         certutil_dir = os.path.dirname(self.binary)
         if mozinfo.isMac:
             env_var = "DYLD_LIBRARY_PATH"
         elif mozinfo.isUnix:
             env_var = "LD_LIBRARY_PATH"
         else:
             env_var = "PATH"
 
-        env[env_var] = os.path.pathsep.join([certutil_dir, env[env_var]])
+
+        env[env_var] = (os.path.pathsep.join([certutil_dir, env[env_var]])
+                        if env_var in env else certutil_dir)
 
         def certutil(*args):
             cmd = [self.certutil_binary] + list(args)
             self.logger.process_output("certutil",
                                        subprocess.check_output(cmd,
                                                                env=env,
                                                                stderr=subprocess.STDOUT),
                                        " ".join(cmd))