Commit 3f33a025 authored by Wei-Yin Chen (陳威尹)'s avatar Wei-Yin Chen (陳威尹) Committed by Commit Bot

run-swarmed: Support --repeat for better efficiency

When running a small set of tests, the proportion of time running the
test can be very low. Both "--copies N" and "--copies N/M --repeat M"
should give the same results, but the later can be more cost effective.

Bug: None
Change-Id: I0bfa07f80d2b8f2985cd15153d355bd0aedf2dd9
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2206221
Commit-Queue: Wei-Yin Chen (陳威尹) <wychen@chromium.org>
Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776793}
parent 73b671bf
...@@ -139,6 +139,8 @@ def _Spawn(args): ...@@ -139,6 +139,8 @@ def _Spawn(args):
] ]
if args.gtest_filter: if args.gtest_filter:
trigger_args.append('--gtest_filter=' + args.gtest_filter) trigger_args.append('--gtest_filter=' + args.gtest_filter)
if args.repeat:
trigger_args.append('--repeat=' + args.repeat)
elif args.target_os == 'fuchsia': elif args.target_os == 'fuchsia':
filter_file = \ filter_file = \
'testing/buildbot/filters/fuchsia.' + args.target_name + '.filter' 'testing/buildbot/filters/fuchsia.' + args.target_name + '.filter'
...@@ -212,6 +214,8 @@ def main(): ...@@ -212,6 +214,8 @@ def main():
parser.add_argument('--gtest_filter', parser.add_argument('--gtest_filter',
help='Use the given gtest_filter, rather than the ' help='Use the given gtest_filter, rather than the '
'default filter file, if any.') 'default filter file, if any.')
parser.add_argument(
'--repeat', help='Number of times to repeat the specified set of tests.')
parser.add_argument('--no-test-flags', action='store_true', parser.add_argument('--no-test-flags', action='store_true',
help='Do not add --test-launcher-summary-output and ' help='Do not add --test-launcher-summary-output and '
'--system-log-file flags to the comment.') '--system-log-file flags to the comment.')
......
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