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 | 6 |
7 import fnmatch | 7 import fnmatch |
8 import glob | 8 import glob |
9 import logging | 9 import logging |
10 import os | 10 import os |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 'remap', | 117 'remap', |
118 '--isolate', isolate_abs_path, | 118 '--isolate', isolate_abs_path, |
119 '--isolated', isolated_abs_path, | 119 '--isolated', isolated_abs_path, |
120 '--outdir', constants.ISOLATE_DEPS_DIR, | 120 '--outdir', constants.ISOLATE_DEPS_DIR, |
121 | 121 |
122 '--path-variable', 'PRODUCT_DIR', constants.GetOutDirectory(), | 122 '--path-variable', 'PRODUCT_DIR', constants.GetOutDirectory(), |
123 | 123 |
124 '--config-variable', 'OS', 'android', | 124 '--config-variable', 'OS', 'android', |
125 '--config-variable', 'chromeos', '0', | 125 '--config-variable', 'chromeos', '0', |
126 '--config-variable', 'component', 'static_library', | 126 '--config-variable', 'component', 'static_library', |
127 '--config-variable', 'icu_use_data_file_flag', '0', | 127 '--config-variable', 'icu_use_data_file_flag', '1', |
128 '--config-variable', 'use_openssl', '0', | 128 '--config-variable', 'use_openssl', '0', |
129 ] | 129 ] |
130 assert not cmd_helper.RunCmd(isolate_cmd) | 130 assert not cmd_helper.RunCmd(isolate_cmd) |
131 | 131 |
132 # We're relying on the fact that timestamps are preserved | 132 # We're relying on the fact that timestamps are preserved |
133 # by the remap command (hardlinked). Otherwise, all the data | 133 # by the remap command (hardlinked). Otherwise, all the data |
134 # will be pushed to the device once we move to using time diff | 134 # will be pushed to the device once we move to using time diff |
135 # instead of md5sum. Perform a sanity check here. | 135 # instead of md5sum. Perform a sanity check here. |
136 for root, _, filenames in os.walk(constants.ISOLATE_DEPS_DIR): | 136 for root, _, filenames in os.walk(constants.ISOLATE_DEPS_DIR): |
137 if filenames: | 137 if filenames: |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 if test_options.gtest_filter: | 317 if test_options.gtest_filter: |
318 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) | 318 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) |
319 | 319 |
320 # Coalesce unit tests into a single test per device | 320 # Coalesce unit tests into a single test per device |
321 if test_options.suite_name != 'content_browsertests': | 321 if test_options.suite_name != 'content_browsertests': |
322 num_devices = len(devices) | 322 num_devices = len(devices) |
323 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 323 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
324 tests = [t for t in tests if t] | 324 tests = [t for t in tests if t] |
325 | 325 |
326 return (TestRunnerFactory, tests) | 326 return (TestRunnerFactory, tests) |
OLD | NEW |