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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 options.j = multiprocessing.cpu_count() | 288 options.j = multiprocessing.cpu_count() |
289 | 289 |
290 while options.random_seed == 0: | 290 while options.random_seed == 0: |
291 options.random_seed = random.SystemRandom().randint(-2147483648, 2147483647) | 291 options.random_seed = random.SystemRandom().randint(-2147483648, 2147483647) |
292 | 292 |
293 def excl(*args): | 293 def excl(*args): |
294 """Returns true if zero or one of multiple arguments are true.""" | 294 """Returns true if zero or one of multiple arguments are true.""" |
295 return reduce(lambda x, y: x + y, args) <= 1 | 295 return reduce(lambda x, y: x + y, args) <= 1 |
296 | 296 |
297 if not excl(options.no_stress, options.stress_only, options.no_variants, | 297 if not excl(options.no_stress, options.stress_only, options.no_variants, |
298 bool(options.variants), options.quickcheck): | 298 bool(options.variants)): |
299 print("Use only one of --no-stress, --stress-only, --no-variants, " | 299 print("Use only one of --no-stress, --stress-only, --no-variants, " |
300 "--variants, or --quickcheck.") | 300 "or --variants.") |
301 return False | 301 return False |
| 302 if options.quickcheck: |
| 303 VARIANTS = ["default", "stress"] |
| 304 options.flaky_tests = "skip" |
| 305 options.slow_tests = "skip" |
| 306 options.pass_fail_tests = "skip" |
302 if options.no_stress: | 307 if options.no_stress: |
303 VARIANTS = ["default", "nocrankshaft"] | 308 VARIANTS = ["default", "nocrankshaft"] |
304 if options.no_variants: | 309 if options.no_variants: |
305 VARIANTS = ["default"] | 310 VARIANTS = ["default"] |
306 if options.stress_only: | 311 if options.stress_only: |
307 VARIANTS = ["stress"] | 312 VARIANTS = ["stress"] |
308 if options.variants: | 313 if options.variants: |
309 VARIANTS = options.variants.split(",") | 314 VARIANTS = options.variants.split(",") |
310 if not set(VARIANTS).issubset(VARIANT_FLAGS.keys()): | 315 if not set(VARIANTS).issubset(VARIANT_FLAGS.keys()): |
311 print "All variants must be in %s" % str(VARIANT_FLAGS.keys()) | 316 print "All variants must be in %s" % str(VARIANT_FLAGS.keys()) |
312 return False | 317 return False |
313 if options.quickcheck: | |
314 VARIANTS = ["default", "stress"] | |
315 options.flaky_tests = "skip" | |
316 options.slow_tests = "skip" | |
317 options.pass_fail_tests = "skip" | |
318 if options.predictable: | 318 if options.predictable: |
319 VARIANTS = ["default"] | 319 VARIANTS = ["default"] |
320 options.extra_flags.append("--predictable") | 320 options.extra_flags.append("--predictable") |
321 options.extra_flags.append("--verify_predictable") | 321 options.extra_flags.append("--verify_predictable") |
322 options.extra_flags.append("--no-inline-new") | 322 options.extra_flags.append("--no-inline-new") |
323 | 323 |
324 if not options.shell_dir: | 324 if not options.shell_dir: |
325 if options.shell: | 325 if options.shell: |
326 print "Warning: --shell is deprecated, use --shell-dir instead." | 326 print "Warning: --shell is deprecated, use --shell-dir instead." |
327 options.shell_dir = os.path.dirname(options.shell) | 327 options.shell_dir = os.path.dirname(options.shell) |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 exit_code = runner.Run(options.j) | 542 exit_code = runner.Run(options.j) |
543 overall_duration = time.time() - start_time | 543 overall_duration = time.time() - start_time |
544 | 544 |
545 if options.time: | 545 if options.time: |
546 verbose.PrintTestDurations(suites, overall_duration) | 546 verbose.PrintTestDurations(suites, overall_duration) |
547 return exit_code | 547 return exit_code |
548 | 548 |
549 | 549 |
550 if __name__ == "__main__": | 550 if __name__ == "__main__": |
551 sys.exit(Main()) | 551 sys.exit(Main()) |
OLD | NEW |