Chromium Code Reviews| 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 instrumentation tests.""" | 5 """Generates test runner factory and tests for instrumentation tests.""" |
| 6 | 6 |
| 7 import logging | 7 import logging |
| 8 import os | 8 import os |
| 9 | 9 |
| 10 from devil.android import device_utils | 10 from devil.android import device_utils |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 DEPS_EXCLUSION_LIST = [] | 24 DEPS_EXCLUSION_LIST = [] |
| 25 | 25 |
| 26 # TODO(mikecase): Remove this function and the constant DEVICE_DATA_DIR | 26 # TODO(mikecase): Remove this function and the constant DEVICE_DATA_DIR |
| 27 # once all data deps are pushed to the same location on the device. | 27 # once all data deps are pushed to the same location on the device. |
| 28 def _PushExtraSuiteDataDeps(device, test_apk): | 28 def _PushExtraSuiteDataDeps(device, test_apk): |
| 29 """Pushes some extra data files/dirs needed by some test suite. | 29 """Pushes some extra data files/dirs needed by some test suite. |
| 30 | 30 |
| 31 Args: | 31 Args: |
| 32 test_apk: The test suite basename for which to return file paths. | 32 test_apk: The test suite basename for which to return file paths. |
| 33 """ | 33 """ |
| 34 if test_apk in ['ChromeTest', 'ContentShellTest']: | 34 if test_apk in ['ChromeTest', 'ContentShellTest', 'CronetTestInstrumentation'] : |
|
pauljensen
2015/10/09 20:58:10
line wrap
xunjieli
2015/10/09 21:19:57
Done.
| |
| 35 test_files = 'net/data/ssl/certificates' | 35 test_files = 'net/data/ssl/certificates' |
| 36 host_device_file_tuple = [ | 36 host_device_file_tuple = [ |
| 37 (os.path.join(constants.DIR_SOURCE_ROOT, test_files), | 37 (os.path.join(constants.DIR_SOURCE_ROOT, test_files), |
| 38 os.path.join(device.GetExternalStoragePath(), test_files))] | 38 os.path.join(device.GetExternalStoragePath(), test_files))] |
| 39 device.PushChangedFiles(host_device_file_tuple) | 39 device.PushChangedFiles(host_device_file_tuple) |
| 40 | 40 |
| 41 | 41 |
| 42 # TODO(mikecase): Remove this function once everything uses | 42 # TODO(mikecase): Remove this function once everything uses |
| 43 # base_setup.PushDataDeps to push data deps to the device. | 43 # base_setup.PushDataDeps to push data deps to the device. |
| 44 def _PushDataDeps(device, test_options): | 44 def _PushDataDeps(device, test_options): |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 102 isolator.Clear() | 102 isolator.Clear() |
| 103 | 103 |
| 104 device_utils.DeviceUtils.parallel(devices).pMap( | 104 device_utils.DeviceUtils.parallel(devices).pMap( |
| 105 _PushExtraSuiteDataDeps, test_options.test_apk) | 105 _PushExtraSuiteDataDeps, test_options.test_apk) |
| 106 | 106 |
| 107 def TestRunnerFactory(device, shard_index): | 107 def TestRunnerFactory(device, shard_index): |
| 108 return test_runner.TestRunner(test_options, device, shard_index, | 108 return test_runner.TestRunner(test_options, device, shard_index, |
| 109 test_pkg) | 109 test_pkg) |
| 110 | 110 |
| 111 return (TestRunnerFactory, tests) | 111 return (TestRunnerFactory, tests) |
| OLD | NEW |