Bug 1171687 - Part 2: Fix running xpcshell tests that initialize NSS locally. r=glandium,gbrown
MozReview-Commit-ID: 8P1XTi38CtD
--- a/testing/xpcshell/remotexpcshelltests.py
+++ b/testing/xpcshell/remotexpcshelltests.py
@@ -304,16 +304,20 @@ class XPCShellRemote(xpcshell.XPCShellTe
'remoteMinidumpDir': self.remoteMinidumpDir,
'remoteClearDirScript': self.remoteClearDirScript,
}
if self.remoteAPK:
self.mobileArgs['remoteAPK'] = self.remoteAPK
def setLD_LIBRARY_PATH(self):
self.env["LD_LIBRARY_PATH"] = self.remoteBinDir
+ # Without LD_PRELOAD=/path/to/libmozglue.so, we crash free-ing
+ # memory deep in NSS.
+ self.env["LD_PRELOAD"] = remoteJoin(self.remoteBinDir, 'libmozglue.so')
+
def pushWrapper(self):
# Rather than executing xpcshell directly, this wrapper script is
# used. By setting environment variables and the cwd in the script,
# the length of the per-test command line is shortened. This is
# often important when using ADB, as there is a limit to the length
# of the ADB command line.
localWrapper = tempfile.mktemp()