| OLD | NEW |
| 1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 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 """Generates test runner factory and tests for GTests.""" | 5 """Generates test runner factory and tests for GTests.""" |
| 6 # pylint: disable=W0212 | 6 # pylint: disable=W0212 |
| 7 | 7 |
| 8 import fnmatch | 8 import fnmatch |
| 9 import glob | 9 import glob |
| 10 import logging | 10 import logging |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 '--outdir', constants.ISOLATE_DEPS_DIR, | 131 '--outdir', constants.ISOLATE_DEPS_DIR, |
| 132 | 132 |
| 133 '--path-variable', 'DEPTH', constants.DIR_SOURCE_ROOT, | 133 '--path-variable', 'DEPTH', constants.DIR_SOURCE_ROOT, |
| 134 '--path-variable', 'PRODUCT_DIR', constants.GetOutDirectory(), | 134 '--path-variable', 'PRODUCT_DIR', constants.GetOutDirectory(), |
| 135 | 135 |
| 136 '--config-variable', 'OS', 'android', | 136 '--config-variable', 'OS', 'android', |
| 137 '--config-variable', 'CONFIGURATION_NAME', constants.GetBuildType(), | 137 '--config-variable', 'CONFIGURATION_NAME', constants.GetBuildType(), |
| 138 '--config-variable', 'chromeos', '0', | 138 '--config-variable', 'chromeos', '0', |
| 139 '--config-variable', 'component', 'static_library', | 139 '--config-variable', 'component', 'static_library', |
| 140 '--config-variable', 'icu_use_data_file_flag', '1', | 140 '--config-variable', 'icu_use_data_file_flag', '1', |
| 141 # TODO(maruel): This may not be always true. |
| 142 '--config-variable', 'target_arch', 'arm', |
| 141 '--config-variable', 'use_openssl', '0', | 143 '--config-variable', 'use_openssl', '0', |
| 142 ] | 144 ] |
| 143 assert not cmd_helper.RunCmd(isolate_cmd) | 145 assert not cmd_helper.RunCmd(isolate_cmd) |
| 144 | 146 |
| 145 # We're relying on the fact that timestamps are preserved | 147 # We're relying on the fact that timestamps are preserved |
| 146 # by the remap command (hardlinked). Otherwise, all the data | 148 # by the remap command (hardlinked). Otherwise, all the data |
| 147 # will be pushed to the device once we move to using time diff | 149 # will be pushed to the device once we move to using time diff |
| 148 # instead of md5sum. Perform a sanity check here. | 150 # instead of md5sum. Perform a sanity check here. |
| 149 for root, _, filenames in os.walk(constants.ISOLATE_DEPS_DIR): | 151 for root, _, filenames in os.walk(constants.ISOLATE_DEPS_DIR): |
| 150 if filenames: | 152 if filenames: |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 344 if test_options.gtest_filter: | 346 if test_options.gtest_filter: |
| 345 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) | 347 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) |
| 346 | 348 |
| 347 # Coalesce unit tests into a single test per device | 349 # Coalesce unit tests into a single test per device |
| 348 if test_options.suite_name != 'content_browsertests': | 350 if test_options.suite_name != 'content_browsertests': |
| 349 num_devices = len(devices) | 351 num_devices = len(devices) |
| 350 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 352 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
| 351 tests = [t for t in tests if t] | 353 tests = [t for t in tests if t] |
| 352 | 354 |
| 353 return (TestRunnerFactory, tests) | 355 return (TestRunnerFactory, tests) |
| OLD | NEW |