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