| OLD | NEW |
| 1 #!/bin/env python | 1 #!/bin/env python |
| 2 # Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2006-2008 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 self._ParseExpectations('linux', is_debug_mode=True) | 94 self._ParseExpectations('linux', is_debug_mode=True) |
| 95 self._ParseExpectations('linux', is_debug_mode=False) | 95 self._ParseExpectations('linux', is_debug_mode=False) |
| 96 else: | 96 else: |
| 97 self._GatherTestFiles(paths) | 97 self._GatherTestFiles(paths) |
| 98 self._expectations = self._ParseExpectations( | 98 self._expectations = self._ParseExpectations( |
| 99 platform_utils.GetTestListPlatformName().lower(), | 99 platform_utils.GetTestListPlatformName().lower(), |
| 100 options.target == 'Debug') | 100 options.target == 'Debug') |
| 101 self._PrepareListsAndPrintOutput() | 101 self._PrepareListsAndPrintOutput() |
| 102 | 102 |
| 103 def __del__(self): | 103 def __del__(self): |
| 104 logging.info("flushing stdout") |
| 104 sys.stdout.flush() | 105 sys.stdout.flush() |
| 106 logging.info("flushing stderr") |
| 105 sys.stderr.flush() | 107 sys.stderr.flush() |
| 108 logging.info("stopping http server") |
| 106 # Stop the http server. | 109 # Stop the http server. |
| 107 self._http_server.Stop() | 110 self._http_server.Stop() |
| 108 | 111 |
| 109 def _GatherTestFiles(self, paths): | 112 def _GatherTestFiles(self, paths): |
| 110 """Generate a set of test files and place them in self._test_files | 113 """Generate a set of test files and place them in self._test_files |
| 111 | 114 |
| 112 Args: | 115 Args: |
| 113 paths: a list of command line paths relative to the webkit/tests | 116 paths: a list of command line paths relative to the webkit/tests |
| 114 directory. glob patterns are ok. | 117 directory. glob patterns are ok. |
| 115 """ | 118 """ |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 option_parser.add_option("", "--run-chunk", | 803 option_parser.add_option("", "--run-chunk", |
| 801 default=None, | 804 default=None, |
| 802 help=("Run a specified chunk (n:l), the nth of len l" | 805 help=("Run a specified chunk (n:l), the nth of len l" |
| 803 ", of the layout tests")) | 806 ", of the layout tests")) |
| 804 option_parser.add_option("", "--batch-size", | 807 option_parser.add_option("", "--batch-size", |
| 805 default=None, | 808 default=None, |
| 806 help=("Run a the tests in batches (n), after every " | 809 help=("Run a the tests in batches (n), after every " |
| 807 "n tests, the test shell is relaunched.")) | 810 "n tests, the test shell is relaunched.")) |
| 808 options, args = option_parser.parse_args() | 811 options, args = option_parser.parse_args() |
| 809 main(options, args) | 812 main(options, args) |
| OLD | NEW |