Commit f762c120 authored by zty@chromium.org's avatar zty@chromium.org

Run android tests through runtest.py.

This CL re-lands https://codereview.chromium.org/414383002. It fixed a bug
where debug testers failed to find binaries. TryServer failed to catch this
bug due to the fact that rel and dbg testers are sharing the same checkout on
bots. https://codereview.chromium.org/452263002/ was submitted to make sure any
tester that downloads and extracts archive will clean it up.

BUG=329102
R=yfriedman@chromium.org, navabi@chromium.org, jbudorick@chromium.org

Review URL: https://codereview.chromium.org/465723002

Cr-Commit-Position: refs/heads/master@{#289231}
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@289231 0039d316-1c4b-4281-b951-d872f2087c98
parent 9eff856d
......@@ -96,6 +96,32 @@ def _GetRevision(options):
return revision
def _RunTest(options, cmd, suite):
"""Run test command with runtest.py.
Args:
options: options object.
cmd: the command to run.
suite: test name.
"""
property_args = bb_utils.EncodeProperties(options)
args = [os.path.join(SLAVE_SCRIPTS_DIR, 'runtest.py')] + property_args
args += ['--test-platform', 'android']
if options.factory_properties.get('generate_gtest_json'):
args.append('--generate-json-file')
args += ['-o', 'gtest-results/%s' % suite,
'--annotate', 'gtest',
'--build-number', str(options.build_properties.get('buildnumber',
'')),
'--builder-name', options.build_properties.get('buildername', '')]
if options.target == 'Release':
args += ['--target', 'Release']
else:
args += ['--target', 'Debug']
args += cmd
RunCmd(args, cwd=DIR_BUILD_ROOT)
def RunTestSuites(options, suites, suites_options=None):
"""Manages an invocation of test_runner.py for gtests.
......@@ -121,11 +147,11 @@ def RunTestSuites(options, suites, suites_options=None):
for suite in suites:
bb_annotations.PrintNamedStep(suite)
cmd = ['build/android/test_runner.py', 'gtest', '-s', suite] + args
cmd = [suite] + args
cmd += suites_options.get(suite, [])
if suite == 'content_browsertests':
cmd.append('--num_retries=1')
RunCmd(cmd)
_RunTest(options, cmd, suite)
def RunChromeDriverTests(options):
......
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