Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(110)

Unified Diff: testing/test_env.py

Issue 935333002: Update from https://crrev.com/316786 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/scripts/webview_licenses.py ('k') | third_party/boringssl/boringssl.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: testing/test_env.py
diff --git a/testing/test_env.py b/testing/test_env.py
index 66a3721beccb78c05d6299b6671a9ae2faf607a8..d19f74feee99b5f27c6d7e7ec9ca1a2133f1c554 100755
--- a/testing/test_env.py
+++ b/testing/test_env.py
@@ -73,20 +73,23 @@ def get_sanitizer_env(cmd, asan, lsan, msan, tsan):
# fact, it needs symbolization to be able to apply suppressions.
symbolization_options = ['symbolize=1',
'external_symbolizer_path=%s' % symbolizer_path]
- elif asan or msan:
- # ASan uses a script for offline symbolization.
+ elif (asan or msan) and sys.platform not in ['win32', 'cygwin']:
+ # ASan uses a script for offline symbolization, except on Windows.
# Important note: when running ASan with leak detection enabled, we must use
# the LSan symbolization options above.
symbolization_options = ['symbolize=0']
# Set the path to llvm-symbolizer to be used by asan_symbolize.py
extra_env['LLVM_SYMBOLIZER_PATH'] = symbolizer_path
+ else:
+ symbolization_options = []
if asan:
asan_options = symbolization_options[:]
if lsan:
asan_options.append('detect_leaks=1')
- extra_env['ASAN_OPTIONS'] = ' '.join(asan_options)
+ if asan_options:
+ extra_env['ASAN_OPTIONS'] = ' '.join(asan_options)
if sys.platform == 'darwin':
isolate_output_dir = os.path.abspath(os.path.dirname(cmd[0]))
@@ -183,7 +186,13 @@ def run_executable(cmd, env):
lsan = '--lsan=1' in cmd
msan = '--msan=1' in cmd
tsan = '--tsan=1' in cmd
- use_symbolization_script = (asan or msan) and not lsan
+ if sys.platform in ['win32', 'cygwin']:
+ # Symbolization works in-process on Windows even when sandboxed.
+ use_symbolization_script = False
+ else:
+ # LSan doesn't support sandboxing yet, so we use the in-process symbolizer.
+ # Note that ASan and MSan can work together with LSan.
+ use_symbolization_script = (asan or msan) and not lsan
if asan or lsan or msan or tsan:
extra_env.update(get_sanitizer_env(cmd, asan, lsan, msan, tsan))
« no previous file with comments | « testing/scripts/webview_licenses.py ('k') | third_party/boringssl/boringssl.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698