| 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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 201 result.add_option("--arch", | 201 result.add_option("--arch", |
| 202 help=("The architecture to run tests for, " | 202 help=("The architecture to run tests for, " |
| 203 "'auto' or 'native' for auto-detect: %s" % SUPPORTED_A
RCHS), | 203 "'auto' or 'native' for auto-detect: %s" % SUPPORTED_A
RCHS), |
| 204 default="ia32,x64,arm") | 204 default="ia32,x64,arm") |
| 205 result.add_option("--arch-and-mode", | 205 result.add_option("--arch-and-mode", |
| 206 help="Architecture and mode in the format 'arch.mode'", | 206 help="Architecture and mode in the format 'arch.mode'", |
| 207 default=None) | 207 default=None) |
| 208 result.add_option("--asan", | 208 result.add_option("--asan", |
| 209 help="Regard test expectations for ASAN", | 209 help="Regard test expectations for ASAN", |
| 210 default=False, action="store_true") | 210 default=False, action="store_true") |
| 211 result.add_option("--sancov-dir", |
| 212 help="Directory where to collect coverage data") |
| 211 result.add_option("--cfi-vptr", | 213 result.add_option("--cfi-vptr", |
| 212 help="Run tests with UBSAN cfi_vptr option.", | 214 help="Run tests with UBSAN cfi_vptr option.", |
| 213 default=False, action="store_true") | 215 default=False, action="store_true") |
| 214 result.add_option("--buildbot", | 216 result.add_option("--buildbot", |
| 215 help="Adapt to path structure used on buildbots", | 217 help="Adapt to path structure used on buildbots", |
| 216 default=False, action="store_true") | 218 default=False, action="store_true") |
| 217 result.add_option("--dcheck-always-on", | 219 result.add_option("--dcheck-always-on", |
| 218 help="Indicates that V8 was compiled with DCHECKs enabled", | 220 help="Indicates that V8 was compiled with DCHECKs enabled", |
| 219 default=False, action="store_true") | 221 default=False, action="store_true") |
| 220 result.add_option("--novfp3", | 222 result.add_option("--novfp3", |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 symbolizer = 'external_symbolizer_path=%s' % ( | 380 symbolizer = 'external_symbolizer_path=%s' % ( |
| 379 os.path.join( | 381 os.path.join( |
| 380 BASE_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'bin', | 382 BASE_DIR, 'third_party', 'llvm-build', 'Release+Asserts', 'bin', |
| 381 'llvm-symbolizer', | 383 'llvm-symbolizer', |
| 382 ) | 384 ) |
| 383 ) | 385 ) |
| 384 | 386 |
| 385 if options.asan: | 387 if options.asan: |
| 386 os.environ['ASAN_OPTIONS'] = symbolizer | 388 os.environ['ASAN_OPTIONS'] = symbolizer |
| 387 | 389 |
| 390 if options.sancov_dir: |
| 391 assert os.path.exists(options.sancov_dir) |
| 392 os.environ['ASAN_OPTIONS'] = ":".join([ |
| 393 'coverage=1', |
| 394 'coverage_dir=%s' % options.sancov_dir, |
| 395 symbolizer, |
| 396 ]) |
| 397 |
| 388 if options.cfi_vptr: | 398 if options.cfi_vptr: |
| 389 os.environ['UBSAN_OPTIONS'] = ":".join([ | 399 os.environ['UBSAN_OPTIONS'] = ":".join([ |
| 390 'print_stacktrace=1', | 400 'print_stacktrace=1', |
| 391 'print_summary=1', | 401 'print_summary=1', |
| 392 'symbolize=1', | 402 'symbolize=1', |
| 393 symbolizer, | 403 symbolizer, |
| 394 ]) | 404 ]) |
| 395 | 405 |
| 396 if options.msan: | 406 if options.msan: |
| 397 os.environ['MSAN_OPTIONS'] = symbolizer | 407 os.environ['MSAN_OPTIONS'] = symbolizer |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 681 timeout, options.isolates, | 691 timeout, options.isolates, |
| 682 options.command_prefix, | 692 options.command_prefix, |
| 683 options.extra_flags, | 693 options.extra_flags, |
| 684 options.no_i18n, | 694 options.no_i18n, |
| 685 options.random_seed, | 695 options.random_seed, |
| 686 options.no_sorting, | 696 options.no_sorting, |
| 687 options.rerun_failures_count, | 697 options.rerun_failures_count, |
| 688 options.rerun_failures_max, | 698 options.rerun_failures_max, |
| 689 options.predictable, | 699 options.predictable, |
| 690 options.no_harness, | 700 options.no_harness, |
| 691 use_perf_data=not options.swarming) | 701 use_perf_data=not options.swarming, |
| 702 sancov_dir=options.sancov_dir) |
| 692 | 703 |
| 693 # TODO(all): Combine "simulator" and "simulator_run". | 704 # TODO(all): Combine "simulator" and "simulator_run". |
| 694 simulator_run = not options.dont_skip_simulator_slow_tests and \ | 705 simulator_run = not options.dont_skip_simulator_slow_tests and \ |
| 695 arch in ['arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', \ | 706 arch in ['arm64', 'arm', 'mipsel', 'mips', 'mips64', 'mips64el', \ |
| 696 'ppc', 'ppc64'] and \ | 707 'ppc', 'ppc64'] and \ |
| 697 ARCH_GUESS and arch != ARCH_GUESS | 708 ARCH_GUESS and arch != ARCH_GUESS |
| 698 # Find available test suites and read test cases from them. | 709 # Find available test suites and read test cases from them. |
| 699 variables = { | 710 variables = { |
| 700 "arch": arch, | 711 "arch": arch, |
| 701 "asan": options.asan, | 712 "asan": options.asan, |
| (...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 813 if exit_code == 1 and options.json_test_results: | 824 if exit_code == 1 and options.json_test_results: |
| 814 print("Force exit code 0 after failures. Json test results file generated " | 825 print("Force exit code 0 after failures. Json test results file generated " |
| 815 "with failure information.") | 826 "with failure information.") |
| 816 exit_code = 0 | 827 exit_code = 0 |
| 817 | 828 |
| 818 return exit_code | 829 return exit_code |
| 819 | 830 |
| 820 | 831 |
| 821 if __name__ == "__main__": | 832 if __name__ == "__main__": |
| 822 sys.exit(Main()) | 833 sys.exit(Main()) |
| OLD | NEW |