From 16ccc46cc64f1aa15f3c0b66b3b3affe20315714 Mon Sep 17 00:00:00 2001 From: Andrew McCreight Date: Fri, 15 Aug 2014 11:10:53 -0700 Subject: [PATCH] Bug 1039633 - Always try to set the ASan symbolizer in gtest runs. r=ted --- testing/gtest/rungtests.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/testing/gtest/rungtests.py b/testing/gtest/rungtests.py index ae06006405b..9034d4ebeff 100644 --- a/testing/gtest/rungtests.py +++ b/testing/gtest/rungtests.py @@ -86,6 +86,19 @@ class GTests(object): env[pathvar] = "%s%s%s" % (self.xre_path, os.pathsep, env[pathvar]) else: env[pathvar] = self.xre_path + + # ASan specific environment stuff + # mozinfo is not set up properly to detect if ASan is enabled, so just always set these. + if mozinfo.isLinux or mozinfo.isMac: + # Symbolizer support + llvmsym = os.path.join(self.xre_path, "llvm-symbolizer") + if os.path.isfile(llvmsym): + env["ASAN_SYMBOLIZER_PATH"] = llvmsym + log.info("gtest | ASan using symbolizer at %s", llvmsym) + else: + # This should be |testFail| instead of |info|. See bug 1050891. + log.info("gtest | Failed to find ASan symbolizer at %s", llvmsym) + return env class gtestOptions(OptionParser):