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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 | 213 |
214 exit_code = 0 | 214 exit_code = 0 |
215 workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), "..")) | 215 workspace = os.path.abspath(join(os.path.dirname(sys.argv[0]), "..")) |
216 if not options.no_presubmit: | 216 if not options.no_presubmit: |
217 print ">>> running presubmit tests" | 217 print ">>> running presubmit tests" |
218 code = subprocess.call( | 218 code = subprocess.call( |
219 [sys.executable, join(workspace, "tools", "presubmit.py")]) | 219 [sys.executable, join(workspace, "tools", "presubmit.py")]) |
220 exit_code = code | 220 exit_code = code |
221 | 221 |
222 suite_paths = utils.GetSuitePaths(join(workspace, "test")) | 222 suite_paths = utils.GetSuitePaths(join(workspace, "test")) |
223 print "all suite_paths:", suite_paths | |
224 | 223 |
225 if len(args) == 0: | 224 if len(args) == 0: |
226 suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ] | 225 suite_paths = [ s for s in suite_paths if s in DEFAULT_TESTS ] |
227 else: | 226 else: |
228 args_suites = set() | 227 args_suites = set() |
229 for arg in args: | 228 for arg in args: |
230 suite = arg.split(os.path.sep)[0] | 229 suite = arg.split(os.path.sep)[0] |
231 if not suite in args_suites: | 230 if not suite in args_suites: |
232 args_suites.add(suite) | 231 args_suites.add(suite) |
233 suite_paths = [ s for s in suite_paths if s in args_suites ] | 232 suite_paths = [ s for s in suite_paths if s in args_suites ] |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
347 except KeyboardInterrupt: | 346 except KeyboardInterrupt: |
348 return 1 | 347 return 1 |
349 | 348 |
350 if options.time: | 349 if options.time: |
351 verbose.PrintTestDurations(suites, overall_duration) | 350 verbose.PrintTestDurations(suites, overall_duration) |
352 return exit_code | 351 return exit_code |
353 | 352 |
354 | 353 |
355 if __name__ == "__main__": | 354 if __name__ == "__main__": |
356 sys.exit(Main()) | 355 sys.exit(Main()) |
OLD | NEW |