Bug 1390964 - Do not clobber an existing LD_LIBRARY_PATH in the mochitest harness. r=ted
MozReview-Commit-ID: 7uQ71Jpq1lM
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -412,17 +412,20 @@ class MochitestServer(object):
self._httpdPath = os.path.abspath(self._httpdPath)
def start(self):
"Run the Mochitest server, returning the process ID of the server."
# get testing environment
env = test_environment(xrePath=self._xrePath, log=self._log)
env["XPCOM_DEBUG_BREAK"] = "warn"
- env["LD_LIBRARY_PATH"] = self._xrePath
+ if "LD_LIBRARY_PATH" not in env or env["LD_LIBRARY_PATH"] is None:
+ env["LD_LIBRARY_PATH"] = self._xrePath
+ else:
+ env["LD_LIBRARY_PATH"] = ":".join([self._xrePath, env["LD_LIBRARY_PATH"]])
# When running with an ASan build, our xpcshell server will also be ASan-enabled,
# thus consuming too much resources when running together with the browser on
# the test slaves. Try to limit the amount of resources by disabling certain
# features.
env["ASAN_OPTIONS"] = "quarantine_size=1:redzone=32:malloc_context_size=5"
# Likewise, when running with a TSan build, our xpcshell server will