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

Side by Side Diff: tools/run-tests.py

Issue 642023002: Introduce a tsan suppressions file (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: updates 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | tools/sanitizers/tsan_suppressions.txt » ('j') | 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 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 options.extra_flags = shlex.split(options.extra_flags) 298 options.extra_flags = shlex.split(options.extra_flags)
299 299
300 if options.gc_stress: 300 if options.gc_stress:
301 options.extra_flags += GC_STRESS_FLAGS 301 options.extra_flags += GC_STRESS_FLAGS
302 302
303 if options.asan: 303 if options.asan:
304 options.extra_flags.append("--invoke-weak-callbacks") 304 options.extra_flags.append("--invoke-weak-callbacks")
305 305
306 if options.tsan: 306 if options.tsan:
307 VARIANTS = ["default"] 307 VARIANTS = ["default"]
308 suppressions_file = os.path.join(os.path.dirname(os.path.abspath(__file__)),
309 'sanitizers', 'tsan_suppressions.txt')
310 tsan_options = '%s suppressions=%s' % (
311 os.environ.get('TSAN_OPTIONS', ''), suppressions_file)
312 os.environ['TSAN_OPTIONS'] = tsan_options
308 313
309 if options.j == 0: 314 if options.j == 0:
310 options.j = multiprocessing.cpu_count() 315 options.j = multiprocessing.cpu_count()
311 316
312 while options.random_seed == 0: 317 while options.random_seed == 0:
313 options.random_seed = random.SystemRandom().randint(-2147483648, 2147483647) 318 options.random_seed = random.SystemRandom().randint(-2147483648, 2147483647)
314 319
315 def excl(*args): 320 def excl(*args):
316 """Returns true if zero or one of multiple arguments are true.""" 321 """Returns true if zero or one of multiple arguments are true."""
317 return reduce(lambda x, y: x + y, args) <= 1 322 return reduce(lambda x, y: x + y, args) <= 1
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 exit_code = runner.Run(options.j) 578 exit_code = runner.Run(options.j)
574 overall_duration = time.time() - start_time 579 overall_duration = time.time() - start_time
575 580
576 if options.time: 581 if options.time:
577 verbose.PrintTestDurations(suites, overall_duration) 582 verbose.PrintTestDurations(suites, overall_duration)
578 return exit_code 583 return exit_code
579 584
580 585
581 if __name__ == "__main__": 586 if __name__ == "__main__":
582 sys.exit(Main()) 587 sys.exit(Main())
OLDNEW
« no previous file with comments | « no previous file | tools/sanitizers/tsan_suppressions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698