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'] = symbolizer | 406 os.environ['ASAN_OPTIONS'] = ":".join([ |
| 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 ]) |
407 | 414 |
408 if options.sancov_dir: | 415 if options.sancov_dir: |
409 assert os.path.exists(options.sancov_dir) | 416 assert os.path.exists(options.sancov_dir) |
410 os.environ['ASAN_OPTIONS'] = ":".join([ | 417 os.environ['ASAN_OPTIONS'] = ":".join([ |
411 'coverage=1', | 418 'coverage=1', |
412 'coverage_dir=%s' % options.sancov_dir, | 419 'coverage_dir=%s' % options.sancov_dir, |
413 symbolizer, | 420 symbolizer, |
414 ]) | 421 ]) |
415 | 422 |
416 if options.cfi_vptr: | 423 if options.cfi_vptr: |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
920 "--coverage-dir=%s" % options.sancov_dir]) | 927 "--coverage-dir=%s" % options.sancov_dir]) |
921 except: | 928 except: |
922 print >> sys.stderr, "Error: Merging sancov files failed." | 929 print >> sys.stderr, "Error: Merging sancov files failed." |
923 exit_code = 1 | 930 exit_code = 1 |
924 | 931 |
925 return exit_code | 932 return exit_code |
926 | 933 |
927 | 934 |
928 if __name__ == "__main__": | 935 if __name__ == "__main__": |
929 sys.exit(Main()) | 936 sys.exit(Main()) |
OLD | NEW |