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

Unified Diff: build/android/buildbot/bb_tests.py

Issue 11829034: Add android buildbot step for apk install (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698