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

Unified Diff: testing/test_env.py

Issue 859293002: Fix report symbolization on swarming bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix trailing slash 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 | « net/net_unittests.isolate ('k') | tools/valgrind/asan/asan_symbolize.py » ('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 0743f340038f4639884a0b131e46c088ce2dd9d6..df2be6e1b75d6963b4afa94cd6d98602298a0597 100755
--- a/testing/test_env.py
+++ b/testing/test_env.py
@@ -105,12 +105,14 @@ def get_asan_env(cmd, lsan):
return extra_env
-def get_sanitizer_symbolize_command(json_path=None):
+def get_sanitizer_symbolize_command(json_path=None, executable_path=None):
"""Construct the command to invoke offline symbolization script."""
script_path = '../tools/valgrind/asan/asan_symbolize.py'
cmd = [sys.executable, script_path]
if json_path is not None:
cmd.append('--test-summary-json-file=%s' % json_path)
+ if executable_path is not None:
+ cmd.append('--executable-path=%s' % executable_path)
return cmd
@@ -130,7 +132,8 @@ def symbolize_snippets_in_json(cmd, env):
return
try:
- symbolize_command = get_sanitizer_symbolize_command(json_path=json_path)
+ symbolize_command = get_sanitizer_symbolize_command(
+ json_path=json_path, executable_path=cmd[0])
p = subprocess.Popen(symbolize_command, stderr=subprocess.PIPE, env=env)
(_, stderr) = p.communicate()
except OSError as e:
@@ -187,8 +190,9 @@ def run_executable(cmd, env):
# Need to pipe to the symbolizer script.
p1 = subprocess.Popen(cmd, env=env, stdout=subprocess.PIPE,
stderr=sys.stdout)
- p2 = subprocess.Popen(get_sanitizer_symbolize_command(),
- env=env, stdin=p1.stdout)
+ p2 = subprocess.Popen(
+ get_sanitizer_symbolize_command(executable_path=cmd[0]),
earthdok 2015/02/05 17:56:00 cmd[0] is not guaranteed to be the test binary tak
+ env=env, stdin=p1.stdout)
p1.stdout.close() # Allow p1 to receive a SIGPIPE if p2 exits.
p1.wait()
p2.wait()
« no previous file with comments | « net/net_unittests.isolate ('k') | tools/valgrind/asan/asan_symbolize.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698