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

Side by Side Diff: testing/test_env.py

Issue 665873002: Set LLVM_SYMBOLIZER_PATH in test_env.py. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Sets environment variables needed to run a chromium unit test.""" 6 """Sets environment variables needed to run a chromium unit test."""
7 7
8 import os 8 import os
9 import stat 9 import stat
10 import subprocess 10 import subprocess
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 suppressions_file = os.path.join(ROOT_DIR, 'tools', 'lsan', 107 suppressions_file = os.path.join(ROOT_DIR, 'tools', 'lsan',
108 'suppressions.txt') 108 'suppressions.txt')
109 lsan_options = ['suppressions=%s' % suppressions_file, 109 lsan_options = ['suppressions=%s' % suppressions_file,
110 'print_suppressions=1'] 110 'print_suppressions=1']
111 extra_env['LSAN_OPTIONS'] = ' '.join(lsan_options) 111 extra_env['LSAN_OPTIONS'] = ' '.join(lsan_options)
112 else: 112 else:
113 # ASan uses a script for offline symbolization. 113 # ASan uses a script for offline symbolization.
114 # Important note: when running ASan with leak detection enabled, we must use 114 # Important note: when running ASan with leak detection enabled, we must use
115 # the LSan symbolization options above. 115 # the LSan symbolization options above.
116 symbolization_options = ['symbolize=0'] 116 symbolization_options = ['symbolize=0']
117 # Set the path to llvm-symbolizer to be used by asan_symbolize.py
118 extra_env['LLVM_SYMBOLIZER_PATH'] = symbolizer_path
117 119
118 asan_options.extend(symbolization_options) 120 asan_options.extend(symbolization_options)
119 121
120 extra_env['ASAN_OPTIONS'] = ' '.join(asan_options) 122 extra_env['ASAN_OPTIONS'] = ' '.join(asan_options)
121 123
122 if sys.platform == 'darwin': 124 if sys.platform == 'darwin':
123 isolate_output_dir = os.path.abspath(os.path.dirname(cmd[0])) 125 isolate_output_dir = os.path.abspath(os.path.dirname(cmd[0]))
124 # This is needed because the test binary has @executable_path embedded in it 126 # This is needed because the test binary has @executable_path embedded in it
125 # it that the OS tries to resolve to the cache directory and not the mapped 127 # it that the OS tries to resolve to the cache directory and not the mapped
126 # directory. 128 # directory.
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 print >> sys.stderr, 'Failed to start %s' % cmd 184 print >> sys.stderr, 'Failed to start %s' % cmd
183 raise 185 raise
184 186
185 187
186 def main(): 188 def main():
187 return run_executable(sys.argv[1:], os.environ.copy()) 189 return run_executable(sys.argv[1:], os.environ.copy())
188 190
189 191
190 if __name__ == '__main__': 192 if __name__ == '__main__':
191 sys.exit(main()) 193 sys.exit(main())
OLDNEW
« 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