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

Unified Diff: scripts/slave/runtest.py

Issue 818273003: Revert r293748 and r293749. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/slave/runtest.py
diff --git a/scripts/slave/runtest.py b/scripts/slave/runtest.py
index 09dfc40360ce045fb55ca899647c561a4af9ce3c..4ceee598addb81fbc8b50c59887f42b9efca8ac3 100755
--- a/scripts/slave/runtest.py
+++ b/scripts/slave/runtest.py
@@ -1029,34 +1029,6 @@ def _GetPerfID(options):
return perf_id
-def _GetSanitizerSymbolizeCommand(strip_path_prefix=None, json_file_name=None):
- script_path = os.path.abspath(os.path.join('src', 'tools', 'valgrind',
- 'asan', 'asan_symbolize.py'))
- command = [sys.executable, script_path]
- if strip_path_prefix:
- command.append(strip_path_prefix)
- if json_file_name:
- command.append('--test-summary-json-file=%s' % json_file_name)
- return command
-
-
-def _SymbolizeSnippetsInJSON(options, json_file_name):
- if not json_file_name:
- return
- symbolize_command = _GetSanitizerSymbolizeCommand(
- strip_path_prefix=options.strip_path_prefix,
- json_file_name=json_file_name)
- try:
- p = subprocess.popen(symbolize_command, stderr=subprocess.PIPE)
- (_, stderr) = p.communicate()
- except OSError as e:
- print 'Exception while symbolizing snippets: %s' % e
-
- if p.returncode != 0:
- print "Error: failed to symbolize snippets in JSON:\n"
- print stderr
-
-
def _MainParse(options, _args):
"""Run input through annotated test parser.
@@ -1162,8 +1134,9 @@ def _MainMac(options, args, extra_env):
pipes = []
if options.enable_asan:
- symbolize_command = _GetSanitizerSymbolizeCommand()
- pipes = [symbolize_command, ['c++filt']]
+ symbolize = os.path.abspath(os.path.join('src', 'tools', 'valgrind',
+ 'asan', 'asan_symbolize.py'))
+ pipes = [[sys.executable, symbolize], ['c++filt']]
command = _GenerateRunIsolatedCommand(build_dir, test_exe_path, options,
command)
@@ -1433,10 +1406,13 @@ def _MainLinux(options, args, extra_env):
pipes = []
# See the comment in main() regarding offline symbolization.
- if options.use_symbolization_script:
- symbolize_command = _GetSanitizerSymbolizeCommand(
- strip_path_prefix=options.strip_path_prefix)
- pipes = [symbolize_command]
+ if (options.enable_asan or options.enable_msan) and not options.enable_lsan:
+ symbolize = os.path.abspath(os.path.join('src', 'tools', 'valgrind',
+ 'asan', 'asan_symbolize.py'))
+ asan_symbolize = [sys.executable, symbolize]
+ if options.strip_path_prefix:
+ asan_symbolize.append(options.strip_path_prefix)
+ pipes = [asan_symbolize]
command = _GenerateRunIsolatedCommand(build_dir, test_exe_path, options,
command)
@@ -1448,8 +1424,6 @@ def _MainLinux(options, args, extra_env):
if start_xvfb:
xvfb.StopVirtualX(slave_name)
if _UsingGtestJson(options):
- if options.use_symbolization_script:
- _SymbolizeSnippetsInJSON(options, json_file_name)
if json_file_name:
_UploadGtestJsonSummary(json_file_name,
options.build_properties,
@@ -1989,7 +1963,6 @@ def main():
symbolization_options = ['symbolize=1',
'external_symbolizer_path=%s' % symbolizer_path,
'strip_path_prefix=%s' % strip_path_prefix]
- options.use_symbolization_script = False
else:
# ASan and MSan use a script for offline symbolization.
# Important note: when running ASan or MSan with leak detection enabled,
@@ -1997,7 +1970,6 @@ def main():
symbolization_options = ['symbolize=0']
# Set the path to llvm-symbolizer to be used by asan_symbolize.py
extra_env['LLVM_SYMBOLIZER_PATH'] = symbolizer_path
- options.use_symbolization_script = True
def AddToExistingEnv(env_dict, key, options_list):
# Adds a key to the supplied environment dictionary but appends it to
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698