Add suite specific options argument to Android test bot.
bb_device_steps.py's RunTestSuites took only one options argument that will be applied for all the running test suites. Add another suites_options argument so that the caller can specify options on certain test suites. BUG=368034 Review URL: https://codereview.chromium.org/297833002 git-svn-id: http://src.chromium.org/svn/trunk/src/build@272657 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
fe1b993df3
Коммит
0184cc1a8d
|
@ -96,13 +96,21 @@ def _GetRevision(options):
|
|||
return revision
|
||||
|
||||
|
||||
def RunTestSuites(options, suites):
|
||||
def RunTestSuites(options, suites, suites_options=None):
|
||||
"""Manages an invocation of test_runner.py for gtests.
|
||||
|
||||
Args:
|
||||
options: options object.
|
||||
suites: List of suite names to run.
|
||||
suites_options: Command line options dictionary for particular suites.
|
||||
For example,
|
||||
{'content_browsertests', ['--num_retries=1', '--release']}
|
||||
will add the options only to content_browsertests.
|
||||
"""
|
||||
|
||||
if not suites_options:
|
||||
suites_options = {}
|
||||
|
||||
args = ['--verbose']
|
||||
if options.target == 'Release':
|
||||
args.append('--release')
|
||||
|
@ -110,9 +118,11 @@ def RunTestSuites(options, suites):
|
|||
args.append('--tool=asan')
|
||||
if options.gtest_filter:
|
||||
args.append('--gtest-filter=%s' % options.gtest_filter)
|
||||
|
||||
for suite in suites:
|
||||
bb_annotations.PrintNamedStep(suite)
|
||||
cmd = ['build/android/test_runner.py', 'gtest', '-s', suite] + args
|
||||
cmd += suites_options.get(suite, [])
|
||||
if suite == 'content_browsertests':
|
||||
cmd.append('--num_retries=1')
|
||||
RunCmd(cmd)
|
||||
|
|
Загрузка…
Ссылка в новой задаче