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 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 def BuildOptions(): | 148 def BuildOptions(): |
149 result = optparse.OptionParser() | 149 result = optparse.OptionParser() |
150 result.add_option("--arch", | 150 result.add_option("--arch", |
151 help=("The architecture to run tests for, " | 151 help=("The architecture to run tests for, " |
152 "'auto' or 'native' for auto-detect"), | 152 "'auto' or 'native' for auto-detect"), |
153 default="ia32,x64,arm") | 153 default="ia32,x64,arm") |
154 result.add_option("--arch-and-mode", | 154 result.add_option("--arch-and-mode", |
155 help="Architecture and mode in the format 'arch.mode'", | 155 help="Architecture and mode in the format 'arch.mode'", |
156 default=None) | 156 default=None) |
| 157 result.add_option("--asan", |
| 158 help="Regard test expectations for ASAN", |
| 159 default=False, action="store_true") |
157 result.add_option("--buildbot", | 160 result.add_option("--buildbot", |
158 help="Adapt to path structure used on buildbots", | 161 help="Adapt to path structure used on buildbots", |
159 default=False, action="store_true") | 162 default=False, action="store_true") |
160 result.add_option("--command-prefix", | 163 result.add_option("--command-prefix", |
161 help="Prepended to each shell command used to run a test", | 164 help="Prepended to each shell command used to run a test", |
162 default="") | 165 default="") |
163 result.add_option("--coverage", help=("Exponential test coverage " | 166 result.add_option("--coverage", help=("Exponential test coverage " |
164 "(range 0.0, 1.0) -- 0.0: one test, 1.0 all tests (slow)"), | 167 "(range 0.0, 1.0) -- 0.0: one test, 1.0 all tests (slow)"), |
165 default=0.4, type="float") | 168 default=0.4, type="float") |
166 result.add_option("--coverage-lift", help=("Lifts test coverage for tests " | 169 result.add_option("--coverage-lift", help=("Lifts test coverage for tests " |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 ctx = context.Context(arch, mode, shell_dir, | 360 ctx = context.Context(arch, mode, shell_dir, |
358 mode_flags, options.verbose, | 361 mode_flags, options.verbose, |
359 timeout, options.isolates, | 362 timeout, options.isolates, |
360 options.command_prefix, | 363 options.command_prefix, |
361 options.extra_flags, | 364 options.extra_flags, |
362 False) | 365 False) |
363 | 366 |
364 # Find available test suites and read test cases from them. | 367 # Find available test suites and read test cases from them. |
365 variables = { | 368 variables = { |
366 "arch": arch, | 369 "arch": arch, |
| 370 "asan": options.asan, |
367 "deopt_fuzzer": True, | 371 "deopt_fuzzer": True, |
368 "gc_stress": False, | 372 "gc_stress": False, |
369 "isolates": options.isolates, | 373 "isolates": options.isolates, |
370 "mode": mode, | 374 "mode": mode, |
371 "no_i18n": False, | 375 "no_i18n": False, |
372 "system": utils.GuessOS(), | 376 "system": utils.GuessOS(), |
373 } | 377 } |
374 all_tests = [] | 378 all_tests = [] |
375 num_tests = 0 | 379 num_tests = 0 |
376 test_id = 0 | 380 test_id = 0 |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
461 return exit_code | 465 return exit_code |
462 | 466 |
463 except KeyboardInterrupt: | 467 except KeyboardInterrupt: |
464 return 1 | 468 return 1 |
465 | 469 |
466 return exit_code | 470 return exit_code |
467 | 471 |
468 | 472 |
469 if __name__ == "__main__": | 473 if __name__ == "__main__": |
470 sys.exit(Main()) | 474 sys.exit(Main()) |
OLD | NEW |