Index: build/android/buildbot/bb_tests.py |
diff --git a/build/android/buildbot/bb_tests.py b/build/android/buildbot/bb_tests.py |
index 9795b22ad8961cffbeba475f7febe5c0841ee32c..71bf85de3bf9119b847cd8cb4afdba1de17609d2 100755 |
--- a/build/android/buildbot/bb_tests.py |
+++ b/build/android/buildbot/bb_tests.py |
@@ -93,9 +93,18 @@ def RunTestSuites(options, suite): |
RunCmd(['build/android/run_tests.py'] + args) |
-def InstallApk(apk, apk_package, target): |
- args = ['--apk', apk, '--apk_package', apk_package] |
- if target == 'Release': |
+def InstallApk(options, test, print_step=False): |
+ """Install an apk to all phones. |
+ |
+ Args: |
+ options: options object |
+ test: An I_TEST namedtuple |
+ print_step: Print a buildbot step |
+ """ |
+ if print_step: |
+ buildbot_report.PrintNamedStep('install_%s' % test.name.lower()) |
+ args = ['--apk', test.apk, '--apk_package', test.apk_package] |
+ if options.target == 'Release': |
args.append('--release') |
RunCmd(['build/android/adb_install_apk.py'] + args) |
@@ -110,7 +119,7 @@ def RunInstrumentationSuite(options, test): |
""" |
buildbot_report.PrintNamedStep('%s_instrumentation_tests' % test.name.lower()) |
- InstallApk(test.apk, test.apk_package, options.target) |
+ InstallApk(options, test) |
boliu
2013/01/09 21:13:42
from your cl description, wouldn't you want to set
Isaac (away)
2013/01/09 21:17:31
No, here it is installed as part of the instrument
boliu
2013/01/09 21:20:58
Oh oops, missed line 170.
|
args = ['--test-apk', test.test_apk, '--test_data', test.test_data, '-vvv', |
'-I'] |
if options.target == 'Release': |
@@ -158,7 +167,7 @@ def MainTestWrapper(options): |
if options.install: |
test_obj = INSTRUMENTATION_TESTS[options.install] |
- InstallApk(test_obj.apk, test_obj.apk_package, options.target) |
+ InstallApk(options, test_obj, print_step=True) |
if not options.test_filter: |
return |