Bug 1216721 - Only get the symbolizer path for ASan for ASan builds. r=chmanchester
authorAndrew McCreight <continuation@gmail.com>
Thu, 22 Oct 2015 09:33:43 -0700
changeset 302381 b5fc7e286929c74bb3e4d2a9cd8d6d9b36b97356
parent 302380 97c0692a9ce5336fb5579aa52581fba8eb79c32a
child 302382 08a76850aef182640f1f06bb73af10f9b01cabe8
push id5392
push userraliiev@mozilla.com
push dateMon, 14 Dec 2015 20:08:23 +0000
treeherdermozilla-beta@16ce8562a975 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschmanchester
bugs1216721
milestone44.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 1216721 - Only get the symbolizer path for ASan for ASan builds. r=chmanchester
testing/runcppunittests.py
--- a/testing/runcppunittests.py
+++ b/testing/runcppunittests.py
@@ -116,23 +116,24 @@ class CPPUnitTests(object):
         elif mozinfo.os == "win":
             pathvar = "PATH"
         if pathvar:
             if pathvar in env:
                 env[pathvar] = "%s%s%s" % (libpath, os.pathsep, env[pathvar])
             else:
                 env[pathvar] = libpath
 
-        # Use llvm-symbolizer for ASan if available/required
-        llvmsym = os.path.join(self.xre_path, "llvm-symbolizer")
-        if os.path.isfile(llvmsym):
-            env["ASAN_SYMBOLIZER_PATH"] = llvmsym
-            self.log.info("ASan using symbolizer at %s" % llvmsym)
-        else:
-            self.log.info("Failed to find ASan symbolizer at %s" % llvmsym)
+        if mozinfo.info["asan"]:
+            # Use llvm-symbolizer for ASan if available/required
+            llvmsym = os.path.join(self.xre_path, "llvm-symbolizer")
+            if os.path.isfile(llvmsym):
+                env["ASAN_SYMBOLIZER_PATH"] = llvmsym
+                self.log.info("ASan using symbolizer at %s" % llvmsym)
+            else:
+                self.log.info("Failed to find ASan symbolizer at %s" % llvmsym)
 
         return env
 
     def run_tests(self, programs, xre_path, symbols_path=None, interactive=False):
         """
         Run a set of C++ unit test programs.
 
         Arguments: