Commit a2a72524 authored by ilevy@chromium.org's avatar ilevy@chromium.org

Add android buildbot step for apk install

Step got dropped in python refactor.  Adding it back.

NOTRY=true

Review URL: https://chromiumcodereview.appspot.com/11829034

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175896 0039d316-1c4b-4281-b951-d872f2087c98
parent 7e38f0ec
...@@ -99,9 +99,18 @@ def RunTestSuites(options, suite): ...@@ -99,9 +99,18 @@ def RunTestSuites(options, suite):
RunCmd(['build/android/run_tests.py'] + args) RunCmd(['build/android/run_tests.py'] + args)
def InstallApk(apk, apk_package, target): def InstallApk(options, test, print_step=False):
args = ['--apk', apk, '--apk_package', apk_package] """Install an apk to all phones.
if target == 'Release':
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') args.append('--release')
RunCmd(['build/android/adb_install_apk.py'] + args) RunCmd(['build/android/adb_install_apk.py'] + args)
...@@ -116,7 +125,7 @@ def RunInstrumentationSuite(options, test): ...@@ -116,7 +125,7 @@ def RunInstrumentationSuite(options, test):
""" """
buildbot_report.PrintNamedStep('%s_instrumentation_tests' % test.name.lower()) buildbot_report.PrintNamedStep('%s_instrumentation_tests' % test.name.lower())
InstallApk(test.apk, test.apk_package, options.target) InstallApk(options, test)
args = ['--test-apk', test.test_apk, '--test_data', test.test_data, '-vvv', args = ['--test-apk', test.test_apk, '--test_data', test.test_data, '-vvv',
'-I'] '-I']
if options.target == 'Release': if options.target == 'Release':
...@@ -164,7 +173,7 @@ def MainTestWrapper(options): ...@@ -164,7 +173,7 @@ def MainTestWrapper(options):
if options.install: if options.install:
test_obj = INSTRUMENTATION_TESTS[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: if not options.test_filter:
return return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment