Index: build/android/test_runner.py |
diff --git a/build/android/test_runner.py b/build/android/test_runner.py |
index 43387cb7ec3c11783c3d3a2b967697c6cd2a3a38..a248788fbf2206a5d1d9e12a39438358df2a61eb 100755 |
--- a/build/android/test_runner.py |
+++ b/build/android/test_runner.py |
@@ -332,6 +332,11 @@ 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', |
+ help=('The path to an optional support apk to be ' |
+ 'installed alongside the test apk. The ' |
+ 'path should be relative to the output ' |
+ 'directory (--output-directory).')) |
group.add_argument('--coverage-dir', |
help=('Directory in which to place all generated ' |
'EMMA coverage files.')) |
@@ -379,8 +384,13 @@ 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(), |
+ args.support_apk) |
+ else: |
+ args.test_support_apk_path = None |
args.test_runner = apk_helper.GetInstrumentationName(args.test_apk_path) |