From 9087e72c670fb6b29daa538e9d45306a4024c809 Mon Sep 17 00:00:00 2001 From: Nathan Froyd Date: Fri, 24 Apr 2015 11:42:54 -0400 Subject: [PATCH] Bug 1158227 - part 2 - set TSAN_OPTIONS environment variable in automationutils.py for TSan; r=jmaher --- build/automationutils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/automationutils.py b/build/automationutils.py index 61dd75780bf..2f8f2ade186 100644 --- a/build/automationutils.py +++ b/build/automationutils.py @@ -401,6 +401,16 @@ def environment(xrePath, env=None, crashreporter=True, debugger=False, dmdPath=N else: log.info(message) + tsan = bool(mozinfo.info.get("tsan")) + if tsan and mozinfo.isLinux: + # Symbolizer support. + llvmsym = os.path.join(xrePath, "llvm-symbolizer") + if os.path.isfile(llvmsym): + env["TSAN_OPTIONS"] = "external_symbolizer_path=%s" % llvmsym + log.info("INFO | runtests.py | TSan using symbolizer at %s" % llvmsym) + else: + log.info("TEST-UNEXPECTED-FAIL | runtests.py | Failed to find TSan symbolizer at %s" % llvmsym) + return env def dumpScreen(utilityPath):