| 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 pylib import constants | 11 from pylib import constants |
| 11 from pylib import valgrind_tools | 12 from pylib import valgrind_tools |
| 12 | |
| 13 from pylib.base import base_setup | 13 from pylib.base import base_setup |
| 14 from pylib.device import device_utils | |
| 15 from pylib.instrumentation import test_package | 14 from pylib.instrumentation import test_package |
| 16 from pylib.instrumentation import test_runner | 15 from pylib.instrumentation import test_runner |
| 17 | 16 |
| 18 DEVICE_DATA_DIR = 'chrome/test/data' | 17 DEVICE_DATA_DIR = 'chrome/test/data' |
| 19 | 18 |
| 20 ISOLATE_FILE_PATHS = { | 19 ISOLATE_FILE_PATHS = { |
| 21 'AndroidWebViewTest': 'android_webview/android_webview_test_apk.isolate', | 20 'AndroidWebViewTest': 'android_webview/android_webview_test_apk.isolate', |
| 22 'ContentShellTest': 'content/content_shell_test_apk.isolate', | 21 'ContentShellTest': 'content/content_shell_test_apk.isolate', |
| 23 } | 22 } |
| 24 | 23 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 i.Clear() | 103 i.Clear() |
| 105 | 104 |
| 106 device_utils.DeviceUtils.parallel(devices).pMap( | 105 device_utils.DeviceUtils.parallel(devices).pMap( |
| 107 _PushExtraSuiteDataDeps, test_options.test_apk) | 106 _PushExtraSuiteDataDeps, test_options.test_apk) |
| 108 | 107 |
| 109 def TestRunnerFactory(device, shard_index): | 108 def TestRunnerFactory(device, shard_index): |
| 110 return test_runner.TestRunner(test_options, device, shard_index, | 109 return test_runner.TestRunner(test_options, device, shard_index, |
| 111 test_pkg) | 110 test_pkg) |
| 112 | 111 |
| 113 return (TestRunnerFactory, tests) | 112 return (TestRunnerFactory, tests) |
| OLD | NEW |