Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(594)

Unified Diff: build/android/pylib/local/device/local_device_test_run.py

Issue 1680233002: Android Add _incremental targets for instrumentation tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add missing dep Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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.
« no previous file with comments | « build/android/pylib/local/device/local_device_instrumentation_test_run.py ('k') | build/android/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698