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

Side by Side Diff: testing/test_env.py

Issue 960873002: Update from https://crrev.com/318214 (Closed) Base URL: https://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 unified diff | Download patch
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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 if lsan: 101 if lsan:
102 if asan or msan: 102 if asan or msan:
103 lsan_options = [] 103 lsan_options = []
104 else: 104 else:
105 lsan_options = symbolization_options[:] 105 lsan_options = symbolization_options[:]
106 if sys.platform == 'linux2': 106 if sys.platform == 'linux2':
107 # Use the debug version of libstdc++ under LSan. If we don't, there will 107 # Use the debug version of libstdc++ under LSan. If we don't, there will
108 # be a lot of incomplete stack traces in the reports. 108 # be a lot of incomplete stack traces in the reports.
109 extra_env['LD_LIBRARY_PATH'] = '/usr/lib/x86_64-linux-gnu/debug:' 109 extra_env['LD_LIBRARY_PATH'] = '/usr/lib/x86_64-linux-gnu/debug:'
110 110
111 suppressions_file = os.path.join(ROOT_DIR, 'tools', 'lsan',
112 'suppressions.txt')
113 lsan_options += ['suppressions=%s' % suppressions_file,
114 'print_suppressions=1']
115 extra_env['LSAN_OPTIONS'] = ' '.join(lsan_options) 111 extra_env['LSAN_OPTIONS'] = ' '.join(lsan_options)
116 112
117 if msan: 113 if msan:
118 msan_options = symbolization_options[:] 114 msan_options = symbolization_options[:]
119 if lsan: 115 if lsan:
120 msan_options.append('detect_leaks=1') 116 msan_options.append('detect_leaks=1')
121 extra_env['MSAN_OPTIONS'] = ' '.join(msan_options) 117 extra_env['MSAN_OPTIONS'] = ' '.join(msan_options)
122 118
123 if tsan: 119 if tsan:
124 tsan_options = symbolization_options[:] 120 tsan_options = symbolization_options[:]
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 print >> sys.stderr, 'Failed to start %s' % cmd 230 print >> sys.stderr, 'Failed to start %s' % cmd
235 raise 231 raise
236 232
237 233
238 def main(): 234 def main():
239 return run_executable(sys.argv[1:], os.environ.copy()) 235 return run_executable(sys.argv[1:], os.environ.copy())
240 236
241 237
242 if __name__ == '__main__': 238 if __name__ == '__main__':
243 sys.exit(main()) 239 sys.exit(main())
OLDNEW
« no previous file with comments | « testing/scripts/gtest_perf_test.py ('k') | third_party/boringssl/linux-arm/crypto/bn/armv4-mont.S » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698