OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """Run layout tests using the test_shell. | 6 """Run layout tests using the test_shell. |
7 | 7 |
8 This is a port of the existing webkit test script run-webkit-tests. | 8 This is a port of the existing webkit test script run-webkit-tests. |
9 | 9 |
10 The TestRunner class runs a series of tests (TestType interface) against a set | 10 The TestRunner class runs a series of tests (TestType interface) against a set |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 cross-tests dependencies tend to occur within the same directory. | 411 cross-tests dependencies tend to occur within the same directory. |
412 | 412 |
413 Return: | 413 Return: |
414 The Queue of lists of TestInfo objects. | 414 The Queue of lists of TestInfo objects. |
415 """ | 415 """ |
416 | 416 |
417 if (self._options.experimental_fully_parallel or | 417 if (self._options.experimental_fully_parallel or |
418 self._is_single_threaded()): | 418 self._is_single_threaded()): |
419 filename_queue = Queue.Queue() | 419 filename_queue = Queue.Queue() |
420 for test_file in test_files: | 420 for test_file in test_files: |
421 filename_queue.put('.', | 421 filename_queue.put( |
422 [self._get_test_info_for_file(test_file)]) | 422 ('.', [self._GetTestInfoForFile(test_file)])) |
423 return filename_queue | 423 return filename_queue |
424 | 424 |
425 tests_by_dir = {} | 425 tests_by_dir = {} |
426 for test_file in test_files: | 426 for test_file in test_files: |
427 directory = self._get_dir_for_test_file(test_file) | 427 directory = self._get_dir_for_test_file(test_file) |
428 tests_by_dir.setdefault(directory, []) | 428 tests_by_dir.setdefault(directory, []) |
429 tests_by_dir[directory].append( | 429 tests_by_dir[directory].append( |
430 self._get_test_info_for_file(test_file)) | 430 self._get_test_info_for_file(test_file)) |
431 | 431 |
432 # Sort by the number of tests in the dir so that the ones with the | 432 # Sort by the number of tests in the dir so that the ones with the |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 help=("The build number of the builder running" | 1664 help=("The build number of the builder running" |
1665 "this script.")) | 1665 "this script.")) |
1666 option_parser.add_option("", "--experimental-fully-parallel", | 1666 option_parser.add_option("", "--experimental-fully-parallel", |
1667 action="store_true", default=False, | 1667 action="store_true", default=False, |
1668 help="run all tests in parallel") | 1668 help="run all tests in parallel") |
1669 return option_parser.parse_args(args) | 1669 return option_parser.parse_args(args) |
1670 | 1670 |
1671 if '__main__' == __name__: | 1671 if '__main__' == __name__: |
1672 options, args = parse_args() | 1672 options, args = parse_args() |
1673 main(options, args) | 1673 main(options, args) |
OLD | NEW |