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 566 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
577 "simulator_run": simulator_run, | 577 "simulator_run": simulator_run, |
578 "simulator": utils.UseSimulator(arch), | 578 "simulator": utils.UseSimulator(arch), |
579 "system": utils.GuessOS(), | 579 "system": utils.GuessOS(), |
580 "tsan": options.tsan, | 580 "tsan": options.tsan, |
581 "msan": options.msan, | 581 "msan": options.msan, |
582 "dcheck_always_on": options.dcheck_always_on, | 582 "dcheck_always_on": options.dcheck_always_on, |
583 "byteorder": sys.byteorder, | 583 "byteorder": sys.byteorder, |
584 } | 584 } |
585 all_tests = [] | 585 all_tests = [] |
586 num_tests = 0 | 586 num_tests = 0 |
587 test_id = 0 | |
588 for s in suites: | 587 for s in suites: |
589 s.ReadStatusFile(variables) | 588 s.ReadStatusFile(variables) |
590 s.ReadTestCases(ctx) | 589 s.ReadTestCases(ctx) |
591 if len(args) > 0: | 590 if len(args) > 0: |
592 s.FilterTestCasesByArgs(args) | 591 s.FilterTestCasesByArgs(args) |
593 all_tests += s.tests | 592 all_tests += s.tests |
594 s.FilterTestCasesByStatus(options.warn_unused, options.flaky_tests, | 593 s.FilterTestCasesByStatus(options.warn_unused, options.flaky_tests, |
595 options.slow_tests, options.pass_fail_tests) | 594 options.slow_tests, options.pass_fail_tests) |
596 if options.cat: | 595 if options.cat: |
597 verbose.PrintTestSource(s.tests) | 596 verbose.PrintTestSource(s.tests) |
598 continue | 597 continue |
599 variant_flags = [VARIANT_FLAGS[var] for var in VARIANTS] | 598 variant_flags = [VARIANT_FLAGS[var] for var in VARIANTS] |
600 s.tests = [ t.CopyAddingFlags(v) | 599 s.tests = [ t.CopyAddingFlags(v) |
601 for t in s.tests | 600 for t in s.tests |
602 for v in s.VariantFlags(t, variant_flags) ] | 601 for v in s.VariantFlags(t, variant_flags) ] |
603 s.tests = ShardTests(s.tests, options.shard_count, options.shard_run) | 602 s.tests = ShardTests(s.tests, options.shard_count, options.shard_run) |
604 num_tests += len(s.tests) | 603 num_tests += len(s.tests) |
605 for t in s.tests: | |
606 t.id = test_id | |
607 test_id += 1 | |
608 | 604 |
609 if options.cat: | 605 if options.cat: |
610 return 0 # We're done here. | 606 return 0 # We're done here. |
611 | 607 |
612 if options.report: | 608 if options.report: |
613 verbose.PrintReport(all_tests) | 609 verbose.PrintReport(all_tests) |
614 | 610 |
615 # Run the tests, either locally or distributed on the network. | 611 # Run the tests, either locally or distributed on the network. |
616 start_time = time.time() | 612 start_time = time.time() |
617 progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() | 613 progress_indicator = progress.PROGRESS_INDICATORS[options.progress]() |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 exit_code = runner.Run(options.j) | 647 exit_code = runner.Run(options.j) |
652 overall_duration = time.time() - start_time | 648 overall_duration = time.time() - start_time |
653 | 649 |
654 if options.time: | 650 if options.time: |
655 verbose.PrintTestDurations(suites, overall_duration) | 651 verbose.PrintTestDurations(suites, overall_duration) |
656 return exit_code | 652 return exit_code |
657 | 653 |
658 | 654 |
659 if __name__ == "__main__": | 655 if __name__ == "__main__": |
660 sys.exit(Main()) | 656 sys.exit(Main()) |
OLD | NEW |