OLD | NEW |
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 os.environ['LANG'] = 'en_US.UTF-8' | 396 os.environ['LANG'] = 'en_US.UTF-8' |
397 | 397 |
398 symbolizer = 'external_symbolizer_path=%s' % ( | 398 symbolizer = 'external_symbolizer_path=%s' % ( |
399 os.path.join( | 399 os.path.join( |
400 BASE_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'bin', | 400 BASE_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'bin', |
401 'llvm-symbolizer', | 401 'llvm-symbolizer', |
402 ) | 402 ) |
403 ) | 403 ) |
404 | 404 |
405 if options.asan: | 405 if options.asan: |
406 os.environ['ASAN_OPTIONS'] = ":".join([ | 406 os.environ['ASAN_OPTIONS'] = symbolizer |
407 'detect_leaks=1', | |
408 symbolizer, | |
409 ]) | |
410 os.environ['LSAN_OPTIONS'] = ":".join([ | |
411 'suppressions=%s' % os.path.join( | |
412 BASE_DIR, 'tools', 'memory', 'lsan', 'suppressions.txt'), | |
413 ]) | |
414 | 407 |
415 if options.sancov_dir: | 408 if options.sancov_dir: |
416 assert os.path.exists(options.sancov_dir) | 409 assert os.path.exists(options.sancov_dir) |
417 os.environ['ASAN_OPTIONS'] = ":".join([ | 410 os.environ['ASAN_OPTIONS'] = ":".join([ |
418 'coverage=1', | 411 'coverage=1', |
419 'coverage_dir=%s' % options.sancov_dir, | 412 'coverage_dir=%s' % options.sancov_dir, |
420 symbolizer, | 413 symbolizer, |
421 ]) | 414 ]) |
422 | 415 |
423 if options.cfi_vptr: | 416 if options.cfi_vptr: |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
927 "--coverage-dir=%s" % options.sancov_dir]) | 920 "--coverage-dir=%s" % options.sancov_dir]) |
928 except: | 921 except: |
929 print >> sys.stderr, "Error: Merging sancov files failed." | 922 print >> sys.stderr, "Error: Merging sancov files failed." |
930 exit_code = 1 | 923 exit_code = 1 |
931 | 924 |
932 return exit_code | 925 return exit_code |
933 | 926 |
934 | 927 |
935 if __name__ == "__main__": | 928 if __name__ == "__main__": |
936 sys.exit(Main()) | 929 sys.exit(Main()) |
OLD | NEW |