| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2011 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 """Runs all the native unit tests. | 6 """Runs all the native unit tests. |
| 7 | 7 |
| 8 1. Copy over test binary to /data/local on device. | 8 1. Copy over test binary to /data/local on device. |
| 9 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) | 9 2. Resources: chrome/unit_tests requires resources (chrome.pak and en-US.pak) |
| 10 to be deployed to the device (in /data/local/tmp). | 10 to be deployed to the device (in /data/local/tmp). |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 logging.critical('(Remember to include the path: out/Release/%s)', | 143 logging.critical('(Remember to include the path: out/Release/%s)', |
| 144 test_suite) | 144 test_suite) |
| 145 return TestResults.FromOkAndFailed([], [BaseTestResult(test_suite, '')]) | 145 return TestResults.FromOkAndFailed([], [BaseTestResult(test_suite, '')]) |
| 146 _TEST_SUITES = [test_suite] | 146 _TEST_SUITES = [test_suite] |
| 147 else: | 147 else: |
| 148 # If not specified, assume the test suites are in out/Release | 148 # If not specified, assume the test suites are in out/Release |
| 149 test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR, | 149 test_suite_dir = os.path.abspath(os.path.join(run_tests_helper.CHROME_DIR, |
| 150 'out', 'Release')) | 150 'out', 'Release')) |
| 151 _TEST_SUITES = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES] | 151 _TEST_SUITES = [os.path.join(test_suite_dir, t) for t in _TEST_SUITES] |
| 152 debug_info_list = [] | 152 debug_info_list = [] |
| 153 print _TEST_SUITES # So it shows up in buildbot output |
| 153 for t in _TEST_SUITES: | 154 for t in _TEST_SUITES: |
| 154 test = SingleTestRunner(device, t, gtest_filter, test_arguments, | 155 test = SingleTestRunner(device, t, gtest_filter, test_arguments, |
| 155 timeout, rebaseline, performance_test, | 156 timeout, rebaseline, performance_test, |
| 156 cleanup_test_files, tool, not not log_dump_name) | 157 cleanup_test_files, tool, not not log_dump_name) |
| 157 test.RunTests() | 158 test.RunTests() |
| 158 results += [test.test_results] | 159 results += [test.test_results] |
| 159 # Collect debug info. | 160 # Collect debug info. |
| 160 debug_info_list += [test.dump_debug_info] | 161 debug_info_list += [test.dump_debug_info] |
| 161 if rebaseline: | 162 if rebaseline: |
| 162 test.UpdateFilter(test.test_results.failed) | 163 test.UpdateFilter(test.test_results.failed) |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 if len(args) > 1: | 259 if len(args) > 1: |
| 259 print 'Unknown argument:', args[1:] | 260 print 'Unknown argument:', args[1:] |
| 260 option_parser.print_usage() | 261 option_parser.print_usage() |
| 261 sys.exit(1) | 262 sys.exit(1) |
| 262 run_tests_helper.SetLogLevel(options.verbose_count) | 263 run_tests_helper.SetLogLevel(options.verbose_count) |
| 263 return Dispatch(options) | 264 return Dispatch(options) |
| 264 | 265 |
| 265 | 266 |
| 266 if __name__ == '__main__': | 267 if __name__ == '__main__': |
| 267 sys.exit(main(sys.argv)) | 268 sys.exit(main(sys.argv)) |
| OLD | NEW |