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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 for (arch, mode) in options.arch_and_mode: | 525 for (arch, mode) in options.arch_and_mode: |
526 try: | 526 try: |
527 code = Execute(arch, mode, args, options, suites, workspace) | 527 code = Execute(arch, mode, args, options, suites, workspace) |
528 except KeyboardInterrupt: | 528 except KeyboardInterrupt: |
529 return 2 | 529 return 2 |
530 exit_code = exit_code or code | 530 exit_code = exit_code or code |
531 return exit_code | 531 return exit_code |
532 | 532 |
533 | 533 |
534 def Execute(arch, mode, args, options, suites, workspace): | 534 def Execute(arch, mode, args, options, suites, workspace): |
| 535 print(">>> Running tests for %s.%s" % (arch, mode)) |
| 536 |
535 shell_dir = options.shell_dir | 537 shell_dir = options.shell_dir |
536 if not shell_dir: | 538 if not shell_dir: |
537 if options.buildbot: | 539 if options.buildbot: |
538 # TODO(machenbach): Get rid of different output folder location on | 540 # TODO(machenbach): Get rid of different output folder location on |
539 # buildbot. Currently this is capitalized Release and Debug. | 541 # buildbot. Currently this is capitalized Release and Debug. |
540 shell_dir = os.path.join(workspace, options.outdir, mode) | 542 shell_dir = os.path.join(workspace, options.outdir, mode) |
541 mode = BuildbotToV8Mode(mode) | 543 mode = BuildbotToV8Mode(mode) |
542 else: | 544 else: |
543 shell_dir = os.path.join( | 545 shell_dir = os.path.join( |
544 workspace, | 546 workspace, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 ] | 644 ] |
643 else: | 645 else: |
644 s.tests = variant_tests | 646 s.tests = variant_tests |
645 | 647 |
646 s.tests = ShardTests(s.tests, options.shard_count, options.shard_run) | 648 s.tests = ShardTests(s.tests, options.shard_count, options.shard_run) |
647 num_tests += len(s.tests) | 649 num_tests += len(s.tests) |
648 | 650 |
649 if options.cat: | 651 if options.cat: |
650 return 0 # We're done here. | 652 return 0 # We're done here. |
651 | 653 |
652 if num_tests == 0: | |
653 print("No tests selected for running!") | |
654 if len(all_tests) > 0: | |
655 verbose.PrintReport(all_tests) | |
656 return 0 | |
657 | |
658 print(">>> Running tests for %s.%s" % (arch, mode)) | |
659 | |
660 if options.report: | 654 if options.report: |
661 verbose.PrintReport(all_tests) | 655 verbose.PrintReport(all_tests) |
662 | 656 |
663 # Run the tests, either locally or distributed on the network. | 657 # Run the tests, either locally or distributed on the network. |
664 start_time = time.time() | 658 start_time = time.time() |
665 progress_indicator = progress.IndicatorNotifier() | 659 progress_indicator = progress.IndicatorNotifier() |
666 progress_indicator.Register(progress.PROGRESS_INDICATORS[options.progress]()) | 660 progress_indicator.Register(progress.PROGRESS_INDICATORS[options.progress]()) |
667 if options.junitout: | 661 if options.junitout: |
668 progress_indicator.Register(progress.JUnitTestProgressIndicator( | 662 progress_indicator.Register(progress.JUnitTestProgressIndicator( |
669 options.junitout, options.junittestsuite)) | 663 options.junitout, options.junittestsuite)) |
(...skipping 30 matching lines...) Expand all Loading... |
700 exit_code = runner.Run(options.j) | 694 exit_code = runner.Run(options.j) |
701 overall_duration = time.time() - start_time | 695 overall_duration = time.time() - start_time |
702 | 696 |
703 if options.time: | 697 if options.time: |
704 verbose.PrintTestDurations(suites, overall_duration) | 698 verbose.PrintTestDurations(suites, overall_duration) |
705 return exit_code | 699 return exit_code |
706 | 700 |
707 | 701 |
708 if __name__ == "__main__": | 702 if __name__ == "__main__": |
709 sys.exit(Main()) | 703 sys.exit(Main()) |
OLD | NEW |