| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 """Dispatches GTests.""" | 5 """Dispatches GTests.""" |
| 6 | 6 |
| 7 import copy | 7 import copy |
| 8 import fnmatch | 8 import fnmatch |
| 9 import logging | 9 import logging |
| 10 import os | 10 import os |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 all_test_suites = gtest_config.STABLE_TEST_SUITES | 55 all_test_suites = gtest_config.STABLE_TEST_SUITES |
| 56 | 56 |
| 57 # List of tuples (suite_name, suite_path) | 57 # List of tuples (suite_name, suite_path) |
| 58 qualified_test_suites = map(GetQualifiedSuite, all_test_suites) | 58 qualified_test_suites = map(GetQualifiedSuite, all_test_suites) |
| 59 | 59 |
| 60 for t, q in qualified_test_suites: | 60 for t, q in qualified_test_suites: |
| 61 if not os.path.exists(q): | 61 if not os.path.exists(q): |
| 62 raise Exception('Test suite %s not found in %s.\n' | 62 raise Exception('Test suite %s not found in %s.\n' |
| 63 'Supported test suites:\n %s\n' | 63 'Supported test suites:\n %s\n' |
| 64 'Ensure it has been built.\n' % | 64 'Ensure it has been built.\n' % |
| 65 (t, q, gtest_config.STABLE_TEST_SUITES)) | 65 (t, q, [s.name for s in gtest_config.STABLE_TEST_SUITES])) |
| 66 return qualified_test_suites | 66 return qualified_test_suites |
| 67 | 67 |
| 68 | 68 |
| 69 def GetTestsFromDevice(runner): | 69 def GetTestsFromDevice(runner): |
| 70 """Get a list of tests from a device, excluding disabled tests. | 70 """Get a list of tests from a device, excluding disabled tests. |
| 71 | 71 |
| 72 Args: | 72 Args: |
| 73 runner: a TestRunner. | 73 runner: a TestRunner. |
| 74 Returns: | 74 Returns: |
| 75 All non-disabled tests on the device. | 75 All non-disabled tests on the device. |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 test_options.test_suite = suite_path | 230 test_options.test_suite = suite_path |
| 231 test_results, test_exit_code = _RunATestSuite(test_options, suite_name) | 231 test_results, test_exit_code = _RunATestSuite(test_options, suite_name) |
| 232 results.AddTestRunResults(test_results) | 232 results.AddTestRunResults(test_results) |
| 233 if test_exit_code and exit_code != constants.ERROR_EXIT_CODE: | 233 if test_exit_code and exit_code != constants.ERROR_EXIT_CODE: |
| 234 exit_code = test_exit_code | 234 exit_code = test_exit_code |
| 235 | 235 |
| 236 if options.use_xvfb: | 236 if options.use_xvfb: |
| 237 framebuffer.Stop() | 237 framebuffer.Stop() |
| 238 | 238 |
| 239 return (results, exit_code) | 239 return (results, exit_code) |
| OLD | NEW |