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