Backed out changeset 18fd8676751a (bug 1333003)

This commit is contained in:
Carsten "Tomcat" Book 2017-03-23 10:38:04 +01:00
parent 51e4b0846f
commit d40c4b5e91
5 changed files with 9 additions and 20 deletions

View File

@ -128,9 +128,7 @@ class GTests(object):
# ASan specific environment stuff
if mozinfo.info["asan"]:
# Symbolizer support
llvmsym = os.path.join(
self.xre_path,
"llvm-symbolizer" + mozinfo.info["bin_suffix"].encode('ascii'))
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)

View File

@ -1554,7 +1554,7 @@ toolbar#nav-bar {
def buildBrowserEnv(self, options, debugger=False, env=None):
"""build the environment variables for the specific test and operating system"""
if mozinfo.info["asan"] and mozinfo.isLinux and mozinfo.bits == 64:
if mozinfo.info["asan"]:
lsanPath = SCRIPT_DIR
else:
lsanPath = None
@ -2029,7 +2029,7 @@ toolbar#nav-bar {
else:
shutdownLeaks = None
if mozinfo.info["asan"] and mozinfo.isLinux and mozinfo.bits == 64:
if mozinfo.info["asan"] and (mozinfo.isLinux or mozinfo.isMac):
lsanLeaks = LSANLeaks(self.log)
else:
lsanLeaks = None

View File

@ -153,12 +153,10 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
# ASan specific environment stuff
asan = bool(mozinfo.info.get("asan"))
if asan:
if asan and (mozinfo.isLinux or mozinfo.isMac):
try:
# Symbolizer support
llvmsym = os.path.join(
xrePath,
"llvm-symbolizer" + mozinfo.info["bin_suffix"].encode('ascii'))
llvmsym = os.path.join(xrePath, "llvm-symbolizer")
if os.path.isfile(llvmsym):
env["ASAN_SYMBOLIZER_PATH"] = llvmsym
log.info("INFO | runtests.py | ASan using symbolizer at %s"
@ -168,11 +166,8 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
" ASan symbolizer at %s" % llvmsym)
# Returns total system memory in kilobytes.
if mozinfo.isWin:
totalMemory = int(
os.popen("wmic computersystem get TotalPhysicalMemory").readlines()[1]) / 1024
else:
totalMemory = int(os.popen("free").readlines()[1].split()[1])
# Works only on unix-like platforms where `free` is in the path.
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

View File

@ -123,9 +123,7 @@ class CPPUnitTests(object):
if mozinfo.info["asan"]:
# Use llvm-symbolizer for ASan if available/required
llvmsym = os.path.join(
self.xre_path,
"llvm-symbolizer" + mozinfo.info["bin_suffix"].encode('ascii'))
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)

View File

@ -942,9 +942,7 @@ class XPCShellTests(object):
usingTSan = "tsan" in self.mozInfo and self.mozInfo["tsan"]
if usingASan or usingTSan:
# symbolizer support
llvmsym = os.path.join(
self.xrePath,
"llvm-symbolizer" + self.mozInfo["bin_suffix"].encode('ascii'))
llvmsym = os.path.join(self.xrePath, "llvm-symbolizer")
if os.path.isfile(llvmsym):
if usingASan:
self.env["ASAN_SYMBOLIZER_PATH"] = llvmsym