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

Side by Side Diff: testing/test_env.py

Issue 645033003: Pass G_SLICE=always-malloc to swarmed ASan tasks. (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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 out.insert(0, sys.executable) 74 out.insert(0, sys.executable)
75 return out 75 return out
76 76
77 77
78 def get_asan_env(cmd, lsan): 78 def get_asan_env(cmd, lsan):
79 """Returns the envirnoment flags needed for ASan and LSan.""" 79 """Returns the envirnoment flags needed for ASan and LSan."""
80 80
81 extra_env = {} 81 extra_env = {}
82 82
83 # Instruct GTK to use malloc while running ASan or LSan tests. 83 # Instruct GTK to use malloc while running ASan or LSan tests.
84 # TODO(earthdok): enabling G_SLICE gives these leaks, locally and on swarming 84 extra_env['G_SLICE'] = 'always-malloc'
85 #0 0x62c01b in __interceptor_malloc (/tmp/run_tha_testXukBDT/out/Release/brows er_tests+0x62c01b)
86 #1 0x7fb64ab64a38 in g_malloc /build/buildd/glib2.0-2.32.4/./glib/gmem.c:159
87 #extra_env['G_SLICE'] = 'always-malloc'
88 85
89 extra_env['NSS_DISABLE_ARENA_FREE_LIST'] = '1' 86 extra_env['NSS_DISABLE_ARENA_FREE_LIST'] = '1'
90 extra_env['NSS_DISABLE_UNLOAD'] = '1' 87 extra_env['NSS_DISABLE_UNLOAD'] = '1'
91 88
92 # TODO(glider): remove the symbolizer path once 89 # TODO(glider): remove the symbolizer path once
93 # https://code.google.com/p/address-sanitizer/issues/detail?id=134 is fixed. 90 # https://code.google.com/p/address-sanitizer/issues/detail?id=134 is fixed.
94 symbolizer_path = os.path.abspath(os.path.join(ROOT_DIR, 'third_party', 91 symbolizer_path = os.path.abspath(os.path.join(ROOT_DIR, 'third_party',
95 'llvm-build', 'Release+Asserts', 'bin', 'llvm-symbolizer')) 92 'llvm-build', 'Release+Asserts', 'bin', 'llvm-symbolizer'))
96 93
97 asan_options = [] 94 asan_options = []
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 print >> sys.stderr, 'Failed to start %s' % cmd 182 print >> sys.stderr, 'Failed to start %s' % cmd
186 raise 183 raise
187 184
188 185
189 def main(): 186 def main():
190 return run_executable(sys.argv[1:], os.environ.copy()) 187 return run_executable(sys.argv[1:], os.environ.copy())
191 188
192 189
193 if __name__ == '__main__': 190 if __name__ == '__main__':
194 sys.exit(main()) 191 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