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

Unified Diff: build/android/test_runner.py

Issue 1208483004: Make instrumentation test dependency on a support APK explicit (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use GYP and GN to set whether the support apk is needed Created 5 years, 6 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/test_runner.py
diff --git a/build/android/test_runner.py b/build/android/test_runner.py
index 43387cb7ec3c11783c3d3a2b967697c6cd2a3a38..911700200cc77ec3a3057b87e4c0ee89c1de87ba 100755
--- a/build/android/test_runner.py
+++ b/build/android/test_runner.py
@@ -332,6 +332,10 @@ def AddInstrumentationTestOptions(parser):
help=('The name of the apk containing the tests '
'(without the .apk extension; '
'e.g. "ContentShellTest").'))
+ group.add_argument('--support-apk', dest='support_apk',
jbudorick 2015/06/24 17:46:39 If possible, I'd vastly prefer we supply the path
dgn 2015/06/24 21:29:50 Providing them based on the output directory was f
+ help=('The name of the support apk to be installed '
+ 'alongside the test apk (without the .apk '
+ 'extension; e.g. "ContentShellSupportTest").'))
group.add_argument('--coverage-dir',
help=('Directory in which to place all generated '
'EMMA coverage files.'))
@@ -379,8 +383,14 @@ def ProcessInstrumentationOptions(args):
constants.GetOutDirectory(),
constants.SDK_BUILD_TEST_JAVALIB_DIR,
'%s.jar' % args.test_apk)
- args.test_support_apk_path = '%sSupport%s' % (
- os.path.splitext(args.test_apk_path))
+
+ if args.support_apk:
+ args.test_support_apk_path = os.path.join(
+ constants.GetOutDirectory(),
+ constants.SDK_BUILD_APKS_DIR,
+ '%s.apk' % args.support_apk)
+ else:
+ args.test_support_apk_path = None
args.test_runner = apk_helper.GetInstrumentationName(args.test_apk_path)

Powered by Google App Engine
This is Rietveld 408576698