Bug 1023368 - ASan tests should show an error when the symbolizer isn't found. r=jmaher
authorAndrew McCreight <continuation@gmail.com>
Sat, 14 Jun 2014 16:43:46 -0700
changeset 188762 7cafd3d4f0d7b8e037114b96518dde99665d4a44
parent 188761 057973613987672beacba1843afb30bb2f466623
child 188763 82418d47c4979d4089f1eeefb99b852fd1aaa792
push id44910
push useramccreight@mozilla.com
push dateSat, 14 Jun 2014 23:44:20 +0000
treeherdermozilla-inbound@82418d47c497 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjmaher
bugs1023368
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 1023368 - ASan tests should show an error when the symbolizer isn't found. r=jmaher
build/automation.py.in
build/automationutils.py
testing/runcppunittests.py
testing/xpcshell/runxpcshelltests.py
--- a/build/automation.py.in
+++ b/build/automation.py.in
@@ -522,16 +522,18 @@ class Automation(object):
 
     # ASan specific environment stuff
     if self.IS_ASAN and (self.IS_LINUX or self.IS_MAC):
       # Symbolizer support
       llvmsym = os.path.join(xrePath, "llvm-symbolizer")
       if os.path.isfile(llvmsym):
         env["ASAN_SYMBOLIZER_PATH"] = llvmsym
         self.log.info("INFO | automation.py | ASan using symbolizer at %s", llvmsym)
+      else:
+        self.log.info("TEST-UNEXPECTED-FAIL | automation.py | Failed to find ASan symbolizer at %s", llvmsym)
 
       try:
         totalMemory = int(os.popen("free").readlines()[1].split()[1])
 
         # Only 4 GB RAM or less available? Use custom ASan options to reduce
         # the amount of resources required to do the tests. Standard options 
         # will otherwise lead to OOM conditions on the current test slaves.
         if totalMemory <= 1024 * 1024 * 4:
--- a/build/automationutils.py
+++ b/build/automationutils.py
@@ -503,17 +503,19 @@ def environment(xrePath, env=None, crash
   # ASan specific environment stuff
   asan = bool(mozinfo.info.get("asan"))
   if asan and (mozinfo.isLinux or mozinfo.isMac):
     try:
       # Symbolizer support
       llvmsym = os.path.join(xrePath, "llvm-symbolizer")
       if os.path.isfile(llvmsym):
         env["ASAN_SYMBOLIZER_PATH"] = llvmsym
-        log.info("ASan using symbolizer at %s", llvmsym)
+        log.info("INFO | runtests.py | ASan using symbolizer at %s", llvmsym)
+      else:
+        log.info("TEST-UNEXPECTED-FAIL | runtests.py | Failed to find ASan symbolizer at %s", llvmsym)
 
       totalMemory = systemMemory()
 
       # Only 4 GB RAM or less available? Use custom ASan options to reduce
       # the amount of resources required to do the tests. Standard options
       # will otherwise lead to OOM conditions on the current test slaves.
       message = "INFO | runtests.py | ASan running in %s configuration"
       if totalMemory <= 1024 * 1024 * 4:
--- a/testing/runcppunittests.py
+++ b/testing/runcppunittests.py
@@ -89,16 +89,19 @@ class CPPUnitTests(object):
                 env[pathvar] = "%s%s%s" % (self.xre_path, os.pathsep, env[pathvar])
             else:
                 env[pathvar] = self.xre_path
 
         # 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
+          log.info("INFO | runcppunittests.py | ASan using symbolizer at %s", llvmsym)
+        else:
+          log.info("TEST-UNEXPECTED-FAIL | runcppunittests.py | Failed to find ASan symbolizer at %s", llvmsym)
 
         return env
 
     def run_tests(self, programs, xre_path, symbols_path=None):
         """
         Run a set of C++ unit test programs.
 
         Arguments:
--- a/testing/xpcshell/runxpcshelltests.py
+++ b/testing/xpcshell/runxpcshelltests.py
@@ -882,17 +882,17 @@ class XPCShellTests(object):
 
         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)
+                self.log.info("TEST-UNEXPECTED-FAIL | runxpcshelltests.py | Failed to find ASan symbolizer at %s", llvmsym)
 
         return self.env
 
     def getPipes(self):
         """
           Determine the value of the stdout and stderr for the test.
           Return value is a list (pStdout, pStderr).
         """