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

Unified Diff: tools/run-tests.py

Issue 1737263003: [coverage] Enable sanitizer coverage. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Logging + exe blacklist Created 4 years, 9 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 | « tools/run-deopt-fuzzer.py ('k') | tools/sanitizers/sancov_formatter.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/run-tests.py
diff --git a/tools/run-tests.py b/tools/run-tests.py
index c94457fe6d296479393ea99044536d2bfe002a55..55c1eb9a465f5bf930db1c387745321bd418ed13 100755
--- a/tools/run-tests.py
+++ b/tools/run-tests.py
@@ -208,6 +208,8 @@ def BuildOptions():
result.add_option("--asan",
help="Regard test expectations for ASAN",
default=False, action="store_true")
+ result.add_option("--sancov-dir",
+ help="Directory where to collect coverage data")
result.add_option("--cfi-vptr",
help="Run tests with UBSAN cfi_vptr option.",
default=False, action="store_true")
@@ -385,6 +387,14 @@ def SetupEnvironment(options):
if options.asan:
os.environ['ASAN_OPTIONS'] = symbolizer
+ if options.sancov_dir:
+ assert os.path.exists(options.sancov_dir)
+ os.environ['ASAN_OPTIONS'] = ":".join([
+ 'coverage=1',
+ 'coverage_dir=%s' % options.sancov_dir,
+ symbolizer,
+ ])
+
if options.cfi_vptr:
os.environ['UBSAN_OPTIONS'] = ":".join([
'print_stacktrace=1',
@@ -688,7 +698,8 @@ def Execute(arch, mode, args, options, suites):
options.rerun_failures_max,
options.predictable,
options.no_harness,
- use_perf_data=not options.swarming)
+ use_perf_data=not options.swarming,
+ sancov_dir=options.sancov_dir)
# TODO(all): Combine "simulator" and "simulator_run".
simulator_run = not options.dont_skip_simulator_slow_tests and \
« no previous file with comments | « tools/run-deopt-fuzzer.py ('k') | tools/sanitizers/sancov_formatter.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698