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

Side by Side 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: 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 import fnmatch 5 import fnmatch
6 import functools 6 import functools
7 import imp
7 import logging 8 import logging
8 9
9 from devil import base_error 10 from devil import base_error
10 from devil.android import device_errors 11 from devil.android import device_errors
12 from incremental_install import installer
jbudorick 2016/02/09 20:08:27 this is going to sound unusual, but please move th
agrieve 2016/02/09 21:43:50 Done.
11 from pylib import valgrind_tools 13 from pylib import valgrind_tools
12 from pylib.base import base_test_result 14 from pylib.base import base_test_result
13 from pylib.base import test_run 15 from pylib.base import test_run
14 from pylib.base import test_collection 16 from pylib.base import test_collection
15 17
16 18
19 def IncrementalInstall(device, apk_helper, installer_script):
20 """Performs an incremental install.
21
22 Args:
23 device: Device to install on.
24 apk_helper: ApkHelper instance for the _incremental.apk.
25 installer_script: Path to the installer script for the incremental apk.
26 """
27 try:
28 install_wrapper = imp.load_source('install_wrapper', installer_script)
29 except IOError:
30 raise Exception('Incremental install script not found: %s\n' %
31 installer_script)
32 params = install_wrapper.GetInstallParameters()
33
34 installer.Install(device, apk_helper, split_globs=params['splits'],
35 native_libs=params['native_libs'],
36 dex_files=params['dex_files'])
37
38
17 def handle_shard_failures(f): 39 def handle_shard_failures(f):
18 """A decorator that handles device failures for per-device functions. 40 """A decorator that handles device failures for per-device functions.
19 41
20 Args: 42 Args:
21 f: the function being decorated. The function must take at least one 43 f: the function being decorated. The function must take at least one
22 argument, and that argument must be the device. 44 argument, and that argument must be the device.
23 """ 45 """
24 return handle_shard_failures_with(None)(f) 46 return handle_shard_failures_with(None)(f)
25 47
26 48
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 return test 185 return test
164 186
165 def _GetTests(self): 187 def _GetTests(self):
166 raise NotImplementedError 188 raise NotImplementedError
167 189
168 def _RunTest(self, device, test): 190 def _RunTest(self, device, test):
169 raise NotImplementedError 191 raise NotImplementedError
170 192
171 def _ShouldShard(self): 193 def _ShouldShard(self):
172 raise NotImplementedError 194 raise NotImplementedError
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698