| 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 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 329 parser = BuildOptions() | 329 parser = BuildOptions() |
| 330 (options, args) = parser.parse_args() | 330 (options, args) = parser.parse_args() |
| 331 if not ProcessOptions(options): | 331 if not ProcessOptions(options): |
| 332 parser.print_help() | 332 parser.print_help() |
| 333 return 1 | 333 return 1 |
| 334 | 334 |
| 335 exit_code = 0 | 335 exit_code = 0 |
| 336 workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), "..")) | 336 workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), "..")) |
| 337 if not options.no_presubmit: | 337 if not options.no_presubmit: |
| 338 print ">>> running presubmit tests" | 338 print ">>> running presubmit tests" |
| 339 code = subprocess.call( | 339 exit_code = subprocess.call( |
| 340 [sys.executable, join(workspace, "tools", "presubmit.py")]) | 340 [sys.executable, join(workspace, "tools", "presubmit.py")]) |
| 341 exit_code = code | |
| 342 code = subprocess.call( | |
| 343 [sys.executable, join(workspace, "tools", "generate-runtime-tests.py"), | |
| 344 "check"]) | |
| 345 exit_code = exit_code or code | |
| 346 | 341 |
| 347 suite_paths = utils.GetSuitePaths(join(workspace, "test")) | 342 suite_paths = utils.GetSuitePaths(join(workspace, "test")) |
| 348 | 343 |
| 349 if len(args) == 0: | 344 if len(args) == 0: |
| 350 suite_paths = [ s for s in DEFAULT_TESTS if s in suite_paths ] | 345 suite_paths = [ s for s in DEFAULT_TESTS if s in suite_paths ] |
| 351 else: | 346 else: |
| 352 args_suites = set() | 347 args_suites = set() |
| 353 for arg in args: | 348 for arg in args: |
| 354 suite = arg.split(os.path.sep)[0] | 349 suite = arg.split(os.path.sep)[0] |
| 355 if not suite in args_suites: | 350 if not suite in args_suites: |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 497 exit_code = runner.Run(options.j) | 492 exit_code = runner.Run(options.j) |
| 498 overall_duration = time.time() - start_time | 493 overall_duration = time.time() - start_time |
| 499 | 494 |
| 500 if options.time: | 495 if options.time: |
| 501 verbose.PrintTestDurations(suites, overall_duration) | 496 verbose.PrintTestDurations(suites, overall_duration) |
| 502 return exit_code | 497 return exit_code |
| 503 | 498 |
| 504 | 499 |
| 505 if __name__ == "__main__": | 500 if __name__ == "__main__": |
| 506 sys.exit(Main()) | 501 sys.exit(Main()) |
| OLD | NEW |