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