| 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 245 default=False, action="store_true") | 245 default=False, action="store_true") |
| 246 result.add_option("--gcov-coverage", | 246 result.add_option("--gcov-coverage", |
| 247 help="Uses executables instrumented for gcov coverage", | 247 help="Uses executables instrumented for gcov coverage", |
| 248 default=False, action="store_true") | 248 default=False, action="store_true") |
| 249 result.add_option("--command-prefix", | 249 result.add_option("--command-prefix", |
| 250 help="Prepended to each shell command used to run a test", | 250 help="Prepended to each shell command used to run a test", |
| 251 default="") | 251 default="") |
| 252 result.add_option("--download-data", help="Download missing test suite data", | 252 result.add_option("--download-data", help="Download missing test suite data", |
| 253 default=False, action="store_true") | 253 default=False, action="store_true") |
| 254 result.add_option("--download-data-only", | 254 result.add_option("--download-data-only", |
| 255 help="Download missing test suite data and exit", | 255 help="Deprecated", |
| 256 default=False, action="store_true") | 256 default=False, action="store_true") |
| 257 result.add_option("--extra-flags", | 257 result.add_option("--extra-flags", |
| 258 help="Additional flags to pass to each test command", | 258 help="Additional flags to pass to each test command", |
| 259 default="") | 259 default="") |
| 260 result.add_option("--isolates", help="Whether to test isolates", | 260 result.add_option("--isolates", help="Whether to test isolates", |
| 261 default=False, action="store_true") | 261 default=False, action="store_true") |
| 262 result.add_option("-j", help="The number of parallel tasks to run", | 262 result.add_option("-j", help="The number of parallel tasks to run", |
| 263 default=0, type="int") | 263 default=0, type="int") |
| 264 result.add_option("-m", "--mode", | 264 result.add_option("-m", "--mode", |
| 265 help="The test modes in which to run (comma-separated," | 265 help="The test modes in which to run (comma-separated," |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 if suite: | 660 if suite: |
| 661 suites.append(suite) | 661 suites.append(suite) |
| 662 | 662 |
| 663 if options.download_data or options.download_data_only: | 663 if options.download_data or options.download_data_only: |
| 664 for s in suites: | 664 for s in suites: |
| 665 s.DownloadData() | 665 s.DownloadData() |
| 666 | 666 |
| 667 if options.download_data_only: | 667 if options.download_data_only: |
| 668 return exit_code | 668 return exit_code |
| 669 | 669 |
| 670 for s in suites: |
| 671 s.PrepareSources() |
| 672 |
| 670 for (arch, mode) in options.arch_and_mode: | 673 for (arch, mode) in options.arch_and_mode: |
| 671 try: | 674 try: |
| 672 code = Execute(arch, mode, args, options, suites) | 675 code = Execute(arch, mode, args, options, suites) |
| 673 except KeyboardInterrupt: | 676 except KeyboardInterrupt: |
| 674 return 2 | 677 return 2 |
| 675 exit_code = exit_code or code | 678 exit_code = exit_code or code |
| 676 return exit_code | 679 return exit_code |
| 677 | 680 |
| 678 | 681 |
| 679 def Execute(arch, mode, args, options, suites): | 682 def Execute(arch, mode, args, options, suites): |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 "--coverage-dir=%s" % options.sancov_dir]) | 881 "--coverage-dir=%s" % options.sancov_dir]) |
| 879 except: | 882 except: |
| 880 print >> sys.stderr, "Error: Merging sancov files failed." | 883 print >> sys.stderr, "Error: Merging sancov files failed." |
| 881 exit_code = 1 | 884 exit_code = 1 |
| 882 | 885 |
| 883 return exit_code | 886 return exit_code |
| 884 | 887 |
| 885 | 888 |
| 886 if __name__ == "__main__": | 889 if __name__ == "__main__": |
| 887 sys.exit(Main()) | 890 sys.exit(Main()) |
| OLD | NEW |