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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), "..")) | 286 workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), "..")) |
287 if not options.no_presubmit: | 287 if not options.no_presubmit: |
288 print ">>> running presubmit tests" | 288 print ">>> running presubmit tests" |
289 code = subprocess.call( | 289 code = subprocess.call( |
290 [sys.executable, join(workspace, "tools", "presubmit.py")]) | 290 [sys.executable, join(workspace, "tools", "presubmit.py")]) |
291 exit_code = code | 291 exit_code = code |
292 | 292 |
293 suite_paths = utils.GetSuitePaths(join(workspace, "test")) | 293 suite_paths = utils.GetSuitePaths(join(workspace, "test")) |
294 | 294 |
295 if len(args) == 0: | 295 if len(args) == 0: |
296 suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ] | 296 suite_paths = [ s for s in DEFAULT_TESTS if s in suite_paths ] |
297 else: | 297 else: |
298 args_suites = set() | 298 args_suites = set() |
299 for arg in args: | 299 for arg in args: |
300 suite = arg.split(os.path.sep)[0] | 300 suite = arg.split(os.path.sep)[0] |
301 if not suite in args_suites: | 301 if not suite in args_suites: |
302 args_suites.add(suite) | 302 args_suites.add(suite) |
303 suite_paths = [ s for s in suite_paths if s in args_suites ] | 303 suite_paths = [ s for s in args_suites if s in suite_paths ] |
304 | 304 |
305 suites = [] | 305 suites = [] |
306 for root in suite_paths: | 306 for root in suite_paths: |
307 suite = testsuite.TestSuite.LoadTestSuite( | 307 suite = testsuite.TestSuite.LoadTestSuite( |
308 os.path.join(workspace, "test", root)) | 308 os.path.join(workspace, "test", root)) |
309 if suite: | 309 if suite: |
310 suites.append(suite) | 310 suites.append(suite) |
311 | 311 |
312 if options.download_data: | 312 if options.download_data: |
313 for s in suites: | 313 for s in suites: |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 except KeyboardInterrupt: | 434 except KeyboardInterrupt: |
435 return 1 | 435 return 1 |
436 | 436 |
437 if options.time: | 437 if options.time: |
438 verbose.PrintTestDurations(suites, overall_duration) | 438 verbose.PrintTestDurations(suites, overall_duration) |
439 return exit_code | 439 return exit_code |
440 | 440 |
441 | 441 |
442 if __name__ == "__main__": | 442 if __name__ == "__main__": |
443 sys.exit(Main()) | 443 sys.exit(Main()) |
OLD | NEW |