| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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', 'asan', '0', | 116 '--config-variable', 'asan', '0', |
| 117 '--config-variable', 'chromeos', '0', | 117 '--config-variable', 'chromeos', '0', |
| 118 '--config-variable', 'component', 'static_library', | 118 '--config-variable', 'component', 'static_library', |
| 119 '--config-variable', 'fastbuild', '0', | 119 '--config-variable', 'fastbuild', '0', |
| 120 '--config-variable', 'icu_use_data_file_flag', '1', | 120 '--config-variable', 'icu_use_data_file_flag', '1', |
| 121 # TODO(maruel): This may not be always true. | 121 # TODO(maruel): This may not be always true. |
| 122 '--config-variable', 'target_arch', 'arm', | 122 '--config-variable', 'target_arch', 'arm', |
| 123 '--config-variable', 'use_openssl', '0', | 123 '--config-variable', 'use_openssl', '0', |
| 124 '--config-variable', 'use_ozone', '0', |
| 124 ] | 125 ] |
| 125 assert not cmd_helper.RunCmd(isolate_cmd) | 126 assert not cmd_helper.RunCmd(isolate_cmd) |
| 126 | 127 |
| 127 # We're relying on the fact that timestamps are preserved | 128 # We're relying on the fact that timestamps are preserved |
| 128 # by the remap command (hardlinked). Otherwise, all the data | 129 # by the remap command (hardlinked). Otherwise, all the data |
| 129 # will be pushed to the device once we move to using time diff | 130 # will be pushed to the device once we move to using time diff |
| 130 # instead of md5sum. Perform a sanity check here. | 131 # instead of md5sum. Perform a sanity check here. |
| 131 for root, _, filenames in os.walk(constants.ISOLATE_DEPS_DIR): | 132 for root, _, filenames in os.walk(constants.ISOLATE_DEPS_DIR): |
| 132 if filenames: | 133 if filenames: |
| 133 linked_file = os.path.join(root, filenames[0]) | 134 linked_file = os.path.join(root, filenames[0]) |
| (...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 335 if test_options.gtest_filter: | 336 if test_options.gtest_filter: |
| 336 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) | 337 tests = unittest_util.FilterTestNames(tests, test_options.gtest_filter) |
| 337 | 338 |
| 338 # Coalesce unit tests into a single test per device | 339 # Coalesce unit tests into a single test per device |
| 339 if test_options.suite_name != 'content_browsertests': | 340 if test_options.suite_name != 'content_browsertests': |
| 340 num_devices = len(devices) | 341 num_devices = len(devices) |
| 341 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] | 342 tests = [':'.join(tests[i::num_devices]) for i in xrange(num_devices)] |
| 342 tests = [t for t in tests if t] | 343 tests = [t for t in tests if t] |
| 343 | 344 |
| 344 return (TestRunnerFactory, tests) | 345 return (TestRunnerFactory, tests) |
| OLD | NEW |