Bug 939513 - Symbolize ASan traces for xpcshell tests. r=ted

This commit is contained in:
Christian Holler 2013-11-21 18:26:28 +01:00
parent 6e47a54a26
commit f82796b971

View File

@ -866,6 +866,15 @@ class XPCShellTests(object):
else:
self.env["LD_LIBRARY_PATH"] = ":".join([self.xrePath, self.env["LD_LIBRARY_PATH"]])
if "asan" in self.mozInfo and self.mozInfo["asan"]:
# ASan symbolizer support
llvmsym = os.path.join(self.xrePath, "llvm-symbolizer")
if os.path.isfile(llvmsym):
self.env["ASAN_SYMBOLIZER_PATH"] = llvmsym
self.log.info("INFO | runxpcshelltests.py | ASan using symbolizer at %s", llvmsym)
else:
self.log.info("INFO | runxpcshelltests.py | ASan symbolizer binary not found: %s", llvmsym)
return self.env
def getPipes(self):
@ -1251,7 +1260,6 @@ class XPCShellTests(object):
self.setAbsPath()
self.buildXpcsRunArgs()
self.buildEnvironment()
self.event = Event()
@ -1264,6 +1272,9 @@ class XPCShellTests(object):
self.mozInfo = parse_json(open(mozInfoFile).read())
mozinfo.update(self.mozInfo)
# buildEnvironment() needs mozInfo, so we call it after mozInfo is initialized.
self.buildEnvironment()
# The appDirKey is a optional entry in either the default or individual test
# sections that defines a relative application directory for test runs. If
# defined we pass 'grePath/$appDirKey' for the -a parameter of the xpcshell