| 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 459 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 threads = [] | 470 threads = [] |
| 471 for i in xrange(int(self._options.num_test_shells)): | 471 for i in xrange(int(self._options.num_test_shells)): |
| 472 # Create separate TestTypes instances for each thread. | 472 # Create separate TestTypes instances for each thread. |
| 473 test_types = [] | 473 test_types = [] |
| 474 for t in self._test_types: | 474 for t in self._test_types: |
| 475 test_types.append(t(self._options.platform, | 475 test_types.append(t(self._options.platform, |
| 476 self._options.results_directory)) | 476 self._options.results_directory)) |
| 477 | 477 |
| 478 test_args, shell_args = self._GetTestShellArgs(i) | 478 test_args, shell_args = self._GetTestShellArgs(i) |
| 479 thread = test_shell_thread.TestShellThread(filename_queue, | 479 thread = test_shell_thread.TestShellThread(filename_queue, |
| 480 test_shell_command, | 480 test_shell_command, |
| 481 test_types, | 481 test_types, |
| 482 test_args, | 482 test_args, |
| 483 shell_args, | 483 shell_args, |
| 484 self._options) | 484 self._options.results_directory, |
| 485 self._options) |
| 485 thread.start() | 486 thread.start() |
| 486 threads.append(thread) | 487 threads.append(thread) |
| 487 | 488 |
| 488 return threads | 489 return threads |
| 489 | 490 |
| 490 def _StopLayoutTestHelper(self, proc): | 491 def _StopLayoutTestHelper(self, proc): |
| 491 """Stop the layout test helper and closes it down.""" | 492 """Stop the layout test helper and closes it down.""" |
| 492 if proc: | 493 if proc: |
| 493 logging.info("Stopping layout test helper") | 494 logging.info("Stopping layout test helper") |
| 494 proc.stdin.write("x\n") | 495 proc.stdin.write("x\n") |
| (...skipping 761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1256 "this script.")) | 1257 "this script.")) |
| 1257 option_parser.add_option("", "--find-baselines", action="store_true", | 1258 option_parser.add_option("", "--find-baselines", action="store_true", |
| 1258 default=False, | 1259 default=False, |
| 1259 help="Prints a table mapping tests to their " | 1260 help="Prints a table mapping tests to their " |
| 1260 "expected results") | 1261 "expected results") |
| 1261 option_parser.add_option("", "--experimental-fully-parallel", | 1262 option_parser.add_option("", "--experimental-fully-parallel", |
| 1262 action="store_true", default=False, | 1263 action="store_true", default=False, |
| 1263 help="run all tests in parallel") | 1264 help="run all tests in parallel") |
| 1264 options, args = option_parser.parse_args() | 1265 options, args = option_parser.parse_args() |
| 1265 main(options, args) | 1266 main(options, args) |
| OLD | NEW |