Commit 69c3cc8b authored by Brian Sheedy's avatar Brian Sheedy Committed by Commit Bot

Fix run_performance_tests with multiple shards

Fixes run_performance_tests.py causing the merge script to blow up in
cases where a gtest-based perf test is run on multiple shards. This
was caused by the script outputting a summary to JSON instead of
per-test results, which caused the merge script to try to merge the
identically named tests.

This is worked around by appending the shard number to the end of the
name, but a proper fix where all test results are reported should still
be implemented.

Bug: 1115658
Change-Id: I55aa3d6c2ce2a4ae681fdcc2338e5016ec478866
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2351386
Auto-Submit: Brian Sheedy <bsheedy@chromium.org>
Commit-Queue: John Chen <johnchen@chromium.org>
Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#797838}
parent 7baae9f7
......@@ -246,9 +246,12 @@ class GtestCommandGenerator(object):
def write_simple_test_results(return_code, output_filepath, benchmark_name):
# TODO(crbug.com/920002): Fix to output
# TODO(crbug.com/1115658): Fix to output
# https://chromium.googlesource.com/chromium/src/+/master/docs/testing/json_test_results_format.md
# for each test rather than this summary.
# Append the shard index to the end of the name so that the merge script
# doesn't blow up trying to merge unmergeable results.
benchmark_name += '_shard_%s' % os.environ.get('GTEST_SHARD_INDEX', '0')
output_json = {
'tests': {
benchmark_name: {
......
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