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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 '--isolated', isolated_abs_path, | 108 '--isolated', isolated_abs_path, |
109 '--outdir', constants.ISOLATE_DEPS_DIR, | 109 '--outdir', constants.ISOLATE_DEPS_DIR, |
110 | 110 |
111 '--path-variable', 'DEPTH', constants.DIR_SOURCE_ROOT, | 111 '--path-variable', 'DEPTH', constants.DIR_SOURCE_ROOT, |
112 '--path-variable', 'PRODUCT_DIR', constants.GetOutDirectory(), | 112 '--path-variable', 'PRODUCT_DIR', constants.GetOutDirectory(), |
113 | 113 |
114 '--config-variable', 'OS', 'android', | 114 '--config-variable', 'OS', 'android', |
115 '--config-variable', 'CONFIGURATION_NAME', constants.GetBuildType(), | 115 '--config-variable', 'CONFIGURATION_NAME', constants.GetBuildType(), |
116 '--config-variable', 'chromeos', '0', | 116 '--config-variable', 'chromeos', '0', |
117 '--config-variable', 'component', 'static_library', | 117 '--config-variable', 'component', 'static_library', |
| 118 '--config-variable', 'fastbuild', '0', |
118 '--config-variable', 'icu_use_data_file_flag', '1', | 119 '--config-variable', 'icu_use_data_file_flag', '1', |
119 # TODO(maruel): This may not be always true. | 120 # TODO(maruel): This may not be always true. |
120 '--config-variable', 'target_arch', 'arm', | 121 '--config-variable', 'target_arch', 'arm', |
121 '--config-variable', 'use_openssl', '0', | 122 '--config-variable', 'use_openssl', '0', |
122 ] | 123 ] |
123 assert not cmd_helper.RunCmd(isolate_cmd) | 124 assert not cmd_helper.RunCmd(isolate_cmd) |
124 | 125 |
125 # We're relying on the fact that timestamps are preserved | 126 # We're relying on the fact that timestamps are preserved |
126 # by the remap command (hardlinked). Otherwise, all the data | 127 # by the remap command (hardlinked). Otherwise, all the data |
127 # will be pushed to the device once we move to using time diff | 128 # will be pushed to the device once we move to using time diff |
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 if test_options.gtest_filter: | 334 if test_options.gtest_filter: |
334 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) | 335 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) |
335 | 336 |
336 # Coalesce unit tests into a single test per device | 337 # Coalesce unit tests into a single test per device |
337 if test_options.suite_name != 'content_browsertests': | 338 if test_options.suite_name != 'content_browsertests': |
338 num_devices = len(devices) | 339 num_devices = len(devices) |
339 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 340 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
340 tests = [t for t in tests if t] | 341 tests = [t for t in tests if t] |
341 | 342 |
342 return (TestRunnerFactory, tests) | 343 return (TestRunnerFactory, tests) |
OLD | NEW |