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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
294 dest="no_network", action="store_true") | 294 dest="no_network", action="store_true") |
295 result.add_option("--no-presubmit", "--nopresubmit", | 295 result.add_option("--no-presubmit", "--nopresubmit", |
296 help='Skip presubmit checks (deprecated)', | 296 help='Skip presubmit checks (deprecated)', |
297 default=False, dest="no_presubmit", action="store_true") | 297 default=False, dest="no_presubmit", action="store_true") |
298 result.add_option("--no-snap", "--nosnap", | 298 result.add_option("--no-snap", "--nosnap", |
299 help='Test a build compiled without snapshot.', | 299 help='Test a build compiled without snapshot.', |
300 default=False, dest="no_snap", action="store_true") | 300 default=False, dest="no_snap", action="store_true") |
301 result.add_option("--no-sorting", "--nosorting", | 301 result.add_option("--no-sorting", "--nosorting", |
302 help="Don't sort tests according to duration of last run.", | 302 help="Don't sort tests according to duration of last run.", |
303 default=False, dest="no_sorting", action="store_true") | 303 default=False, dest="no_sorting", action="store_true") |
304 result.add_option("--no-stress", "--nostress", | |
305 help="Don't run crankshaft --always-opt --stress-op test", | |
306 default=False, dest="no_stress", action="store_true") | |
307 result.add_option("--no-variants", "--novariants", | 304 result.add_option("--no-variants", "--novariants", |
308 help="Don't run any testing variants", | 305 help="Don't run any testing variants", |
309 default=False, dest="no_variants", action="store_true") | 306 default=False, dest="no_variants", action="store_true") |
310 result.add_option("--variants", | 307 result.add_option("--variants", |
311 help="Comma-separated list of testing variants;" | 308 help="Comma-separated list of testing variants;" |
312 " default: \"%s\"" % ",".join(VARIANTS)) | 309 " default: \"%s\"" % ",".join(VARIANTS)) |
313 result.add_option("--exhaustive-variants", | 310 result.add_option("--exhaustive-variants", |
314 default=False, action="store_true", | 311 default=False, action="store_true", |
315 help="Use exhaustive set of default variants:" | 312 help="Use exhaustive set of default variants:" |
316 " \"%s\"" % ",".join(EXHAUSTIVE_VARIANTS)) | 313 " \"%s\"" % ",".join(EXHAUSTIVE_VARIANTS)) |
(...skipping 25 matching lines...) Expand all Loading... | |
342 result.add_option("--shard-run", | 339 result.add_option("--shard-run", |
343 help="Run this shard from the split up tests.", | 340 help="Run this shard from the split up tests.", |
344 default=1, type="int") | 341 default=1, type="int") |
345 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") | 342 result.add_option("--shell", help="DEPRECATED! use --shell-dir", default="") |
346 result.add_option("--shell-dir", help="Directory containing executables", | 343 result.add_option("--shell-dir", help="Directory containing executables", |
347 default="") | 344 default="") |
348 result.add_option("--dont-skip-slow-simulator-tests", | 345 result.add_option("--dont-skip-slow-simulator-tests", |
349 help="Don't skip more slow tests when using a simulator.", | 346 help="Don't skip more slow tests when using a simulator.", |
350 default=False, action="store_true", | 347 default=False, action="store_true", |
351 dest="dont_skip_simulator_slow_tests") | 348 dest="dont_skip_simulator_slow_tests") |
352 result.add_option("--stress-only", | |
353 help="Only run tests with --always-opt --stress-opt", | |
354 default=False, action="store_true") | |
355 result.add_option("--swarming", | 349 result.add_option("--swarming", |
356 help="Indicates running test driver on swarming.", | 350 help="Indicates running test driver on swarming.", |
357 default=False, action="store_true") | 351 default=False, action="store_true") |
358 result.add_option("--time", help="Print timing information after running", | 352 result.add_option("--time", help="Print timing information after running", |
359 default=False, action="store_true") | 353 default=False, action="store_true") |
360 result.add_option("-t", "--timeout", help="Timeout in seconds", | 354 result.add_option("-t", "--timeout", help="Timeout in seconds", |
361 default=TIMEOUT_DEFAULT, type="int") | 355 default=TIMEOUT_DEFAULT, type="int") |
362 result.add_option("--tsan", | 356 result.add_option("--tsan", |
363 help="Regard test expectations for TSAN", | 357 help="Regard test expectations for TSAN", |
364 default=False, action="store_true") | 358 default=False, action="store_true") |
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
538 if options.j == 0: | 532 if options.j == 0: |
539 options.j = multiprocessing.cpu_count() | 533 options.j = multiprocessing.cpu_count() |
540 | 534 |
541 if options.random_seed_stress_count <= 1 and options.random_seed == 0: | 535 if options.random_seed_stress_count <= 1 and options.random_seed == 0: |
542 options.random_seed = RandomSeed() | 536 options.random_seed = RandomSeed() |
543 | 537 |
544 def excl(*args): | 538 def excl(*args): |
545 """Returns true if zero or one of multiple arguments are true.""" | 539 """Returns true if zero or one of multiple arguments are true.""" |
546 return reduce(lambda x, y: x + y, args) <= 1 | 540 return reduce(lambda x, y: x + y, args) <= 1 |
547 | 541 |
548 if not excl(options.no_stress, options.stress_only, options.no_variants, | 542 if not excl(options.no_variants, bool(options.variants)): |
549 bool(options.variants)): | 543 print("Use only one of --no-variants or --variants.") |
550 print("Use only one of --no-stress, --stress-only, --no-variants, " | |
551 "or --variants.") | |
552 return False | 544 return False |
553 if options.quickcheck: | 545 if options.quickcheck: |
554 VARIANTS = ["default", "stress"] | 546 VARIANTS = ["default", "stress"] |
Michael Achenbach
2016/08/01 15:05:49
I'm also not so happy about this anymore, but I'll
| |
555 options.slow_tests = "skip" | 547 options.slow_tests = "skip" |
556 options.pass_fail_tests = "skip" | 548 options.pass_fail_tests = "skip" |
557 if options.no_stress: | |
558 # FIXME(machenbach): This is not very intuitive anymore. Maybe remove a | |
559 # bunch of these shortcuts and require stating the variants explicitly. | |
560 VARIANTS = ["default", "nocrankshaft"] | |
561 if options.no_variants: | 549 if options.no_variants: |
562 VARIANTS = ["default"] | 550 VARIANTS = ["default"] |
563 if options.stress_only: | |
564 VARIANTS = ["stress"] | |
565 if options.variants: | 551 if options.variants: |
566 VARIANTS = options.variants.split(",") | 552 VARIANTS = options.variants.split(",") |
567 | 553 |
568 # Resolve variant aliases. | 554 # Resolve variant aliases. |
569 VARIANTS = reduce( | 555 VARIANTS = reduce( |
570 list.__add__, | 556 list.__add__, |
571 (VARIANT_ALIASES.get(v, [v]) for v in VARIANTS), | 557 (VARIANT_ALIASES.get(v, [v]) for v in VARIANTS), |
572 [], | 558 [], |
573 ) | 559 ) |
574 | 560 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
902 "--coverage-dir=%s" % options.sancov_dir]) | 888 "--coverage-dir=%s" % options.sancov_dir]) |
903 except: | 889 except: |
904 print >> sys.stderr, "Error: Merging sancov files failed." | 890 print >> sys.stderr, "Error: Merging sancov files failed." |
905 exit_code = 1 | 891 exit_code = 1 |
906 | 892 |
907 return exit_code | 893 return exit_code |
908 | 894 |
909 | 895 |
910 if __name__ == "__main__": | 896 if __name__ == "__main__": |
911 sys.exit(Main()) | 897 sys.exit(Main()) |
OLD | NEW |