| 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 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 extra_msg = ' last chunk is partial, appending [0:%d]' % extra | 273 extra_msg = ' last chunk is partial, appending [0:%d]' % extra |
| 274 logging.info(extra_msg) | 274 logging.info(extra_msg) |
| 275 tests_run_msg += "\n" + extra_msg | 275 tests_run_msg += "\n" + extra_msg |
| 276 files.extend(test_files[0:extra]) | 276 files.extend(test_files[0:extra]) |
| 277 self._test_files_list = files | 277 self._test_files_list = files |
| 278 self._test_files = set(files) | 278 self._test_files = set(files) |
| 279 | 279 |
| 280 tests_run_filename = os.path.join(self._options.results_directory, | 280 tests_run_filename = os.path.join(self._options.results_directory, |
| 281 "tests_run.txt") | 281 "tests_run.txt") |
| 282 tests_run_file = open(tests_run_filename, "w") | 282 tests_run_file = open(tests_run_filename, "w") |
| 283 tests_run_file.write(tests_run_msg) | 283 tests_run_file.write(tests_run_msg + "\n") |
| 284 tests_run_file.close() | 284 tests_run_file.close() |
| 285 | 285 |
| 286 # update expectations so that the stats are calculated correctly | 286 # update expectations so that the stats are calculated correctly |
| 287 self._expectations = self._ParseExpectations( | 287 self._expectations = self._ParseExpectations( |
| 288 path_utils.PlatformName(), options.target == 'Debug') | 288 path_utils.PlatformName(), options.target == 'Debug') |
| 289 else: | 289 else: |
| 290 logging.info('Run: %d tests' % len(self._test_files)) | 290 logging.info('Run: %d tests' % len(self._test_files)) |
| 291 | 291 |
| 292 logging.info('Deferred: %d tests' % len(self._expectations.GetDeferred())) | 292 logging.info('Deferred: %d tests' % len(self._expectations.GetDeferred())) |
| 293 logging.info('Expected passes: %d tests' % | 293 logging.info('Expected passes: %d tests' % |
| (...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1189 option_parser.add_option("", "--build-number", | 1189 option_parser.add_option("", "--build-number", |
| 1190 default="DUMMY_BUILD_NUMBER", | 1190 default="DUMMY_BUILD_NUMBER", |
| 1191 help=("The build number of the builder running" | 1191 help=("The build number of the builder running" |
| 1192 "this script.")) | 1192 "this script.")) |
| 1193 option_parser.add_option("", "--find-baselines", action="store_true", | 1193 option_parser.add_option("", "--find-baselines", action="store_true", |
| 1194 default=False, | 1194 default=False, |
| 1195 help="Prints a table mapping tests to their " | 1195 help="Prints a table mapping tests to their " |
| 1196 "expected results") | 1196 "expected results") |
| 1197 options, args = option_parser.parse_args() | 1197 options, args = option_parser.parse_args() |
| 1198 main(options, args) | 1198 main(options, args) |
| OLD | NEW |