Support --gtest_filter for try jobs.

BUG=17948
TEST=submit various try jobs with and without -t option

Review URL: http://codereview.chromium.org/1733026

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@46173 0039d316-1c4b-4281-b951-d872f2087c98
experimental/szager/collated-output
vandebo@chromium.org 16 years ago
parent b2b4631780
commit c305768692

@ -263,8 +263,8 @@ def _ParseSendChangeOptions(options):
values['revision'] = options.revision values['revision'] = options.revision
if options.clobber: if options.clobber:
values['clobber'] = 'true' values['clobber'] = 'true'
if options.tests: if options.testfilter:
values['tests'] = ','.join(options.tests) values['testfilter'] = ','.join(options.testfilter)
if options.root: if options.root:
values['root'] = options.root values['root'] = options.root
if options.patchlevel: if options.patchlevel:
@ -496,10 +496,14 @@ def TryChange(argv,
help="Override which project to use. Projects are defined " help="Override which project to use. Projects are defined "
"server-side to define what default bot set to use") "server-side to define what default bot set to use")
# Override the list of tests to run, use multiple times to list many tests group.add_option("-t", "--testfilter", action="append",
# (or comma separated) help="Add a gtest_filter to a test. Use multiple times to "
group.add_option("-t", "--tests", action="append", "specify filters for different tests. (i.e. "
help=optparse.SUPPRESS_HELP) "--testfilter base_unittests:ThreadTest.* "
"--testfilter ui_tests) If you specify any testfilters "
"the test results will not be reported in rietveld and "
"only tests with filters will run.")
parser.add_option_group(group) parser.add_option_group(group)
group = optparse.OptionGroup(parser, "Patch to run") group = optparse.OptionGroup(parser, "Patch to run")
@ -683,6 +687,11 @@ def TryChange(argv,
else: else:
print('Results will be emailed to: ' + options.email) print('Results will be emailed to: ' + options.email)
# Prevent rietveld updates if we aren't running all the tests.
if options.testfilter is not None:
options.issue = None
options.patchset = None
# Send the patch. # Send the patch.
if options.send_patch: if options.send_patch:
# If forced. # If forced.

Loading…
Cancel
Save