| Index: build/android/pylib/local/device/local_device_test_run.py
|
| diff --git a/build/android/pylib/local/device/local_device_test_run.py b/build/android/pylib/local/device/local_device_test_run.py
|
| index 7387bb9a5baaffa9e61f4a7f88f84c19711fb4d7..4660b8e4ab368312fd313cf1f8d320ff9dd28fd2 100644
|
| --- a/build/android/pylib/local/device/local_device_test_run.py
|
| +++ b/build/android/pylib/local/device/local_device_test_run.py
|
| @@ -4,6 +4,7 @@
|
|
|
| import fnmatch
|
| import functools
|
| +import imp
|
| import logging
|
|
|
| from devil import base_error
|
| @@ -14,6 +15,27 @@ from pylib.base import test_run
|
| from pylib.base import test_collection
|
|
|
|
|
| +def IncrementalInstall(device, apk_helper, installer_script):
|
| + """Performs an incremental install.
|
| +
|
| + Args:
|
| + device: Device to install on.
|
| + apk_helper: ApkHelper instance for the _incremental.apk.
|
| + installer_script: Path to the installer script for the incremental apk.
|
| + """
|
| + try:
|
| + install_wrapper = imp.load_source('install_wrapper', installer_script)
|
| + except IOError:
|
| + raise Exception('Incremental install script not found: %s\n' %
|
| + installer_script)
|
| + params = install_wrapper.GetInstallParameters()
|
| +
|
| + from incremental_install import installer
|
| + installer.Install(device, apk_helper, split_globs=params['splits'],
|
| + native_libs=params['native_libs'],
|
| + dex_files=params['dex_files'])
|
| +
|
| +
|
| def handle_shard_failures(f):
|
| """A decorator that handles device failures for per-device functions.
|
|
|
|
|