Bug 1026830 - Add LD_LIBRARY_PATH=xrePath when launching utilities; r=jmaher
authorGeoff Brown <gbrown@mozilla.com>
Wed, 18 Jun 2014 20:39:34 -0600
changeset 210301 be39bbf27fac83a0bb14389e1ef38a9b174ba863
parent 210300 2daf3d9be2cb95d8e8bce3173420c16d75a61872
child 210302 867fabab7a851b74baf436ed1e58421f51d37d32
push id3857
push userraliiev@mozilla.com
push dateTue, 02 Sep 2014 16:39:23 +0000
treeherdermozilla-beta@5638b907b505 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1026830
milestone33.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1026830 - Add LD_LIBRARY_PATH=xrePath when launching utilities; r=jmaher
testing/mochitest/runtests.py
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -143,16 +143,17 @@ 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 = environment(xrePath=self._xrePath)
     env["XPCOM_DEBUG_BREAK"] = "warn"
+    env["LD_LIBRARY_PATH"] = self._xrePath
 
     # 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"
 
     if mozinfo.isWin:
@@ -741,16 +742,17 @@ class SSLTunnel:
     # start ssltunnel to provide https:// URLs capability
     bin_suffix = mozinfo.info.get('bin_suffix', '')
     ssltunnel = os.path.join(self.utilityPath, "ssltunnel" + bin_suffix)
     if not os.path.exists(ssltunnel):
       log.error("INFO | runtests.py | expected to find ssltunnel at %s", ssltunnel)
       exit(1)
 
     env = environment(xrePath=self.xrePath)
+    env["LD_LIBRARY_PATH"] = self.xrePath
     self.process = mozprocess.ProcessHandler([ssltunnel, self.configFile],
                                                env=env)
     self.process.run()
     log.info("INFO | runtests.py | SSL tunnel pid: %d", self.process.pid)
 
   def stop(self):
     """ Stops the SSL Tunnel and cleans up """
     if self.process is not None:
@@ -911,16 +913,17 @@ class Mochitest(MochitestUtilsMixin):
     # https://bugzilla.mozilla.org/show_bug.cgi?id=746243#c35
 
     pwfilePath = os.path.join(options.profilePath, ".crtdbpw")
     with open(pwfilePath, "w") as pwfile:
       pwfile.write("\n")
 
     # Pre-create the certification database for the profile
     env = self.environment(xrePath=options.xrePath)
+    env["LD_LIBRARY_PATH"] = options.xrePath
     bin_suffix = mozinfo.info.get('bin_suffix', '')
     certutil = os.path.join(options.utilityPath, "certutil" + bin_suffix)
     pk12util = os.path.join(options.utilityPath, "pk12util" + bin_suffix)
 
     if self.certdbNew:
       # android and b2g use the new DB formats exclusively
       certdbPath = "sql:" + options.profilePath
     else: