Commit df895679 authored by Jeff Yoon's avatar Jeff Yoon Committed by Commit Bot

Generate output.json after test execution for iOS

iOS current writes out full_results.json, but moving forward the
Chromium recipe expects an output.json file. We write the same
contents of full_results.json to output.json such that the Chromium
recipe can collect_task and run the noop_merge merge script.

Changes to the content of output.json will be required for utilizing
the standard gtest merge script.

Bug: 1031338
Change-Id: Ifff558d37618afeb371944693a6b76a4be46547d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2032809Reviewed-by: default avatarRohit Rao <rohitrao@chromium.org>
Commit-Queue: Jeff Yoon <jeffyoon@chromium.org>
Cr-Commit-Position: refs/heads/master@{#738683}
parent ba08c24e
...@@ -160,6 +160,21 @@ class Runner(): ...@@ -160,6 +160,21 @@ class Runner():
with open(os.path.join(self.args.out_dir, 'full_results.json'), with open(os.path.join(self.args.out_dir, 'full_results.json'),
'w') as f: 'w') as f:
json.dump(tr.test_results, f) json.dump(tr.test_results, f)
# The value of test-launcher-summary-output is set by the recipe
# and passed here via swarming.py. This argument defaults to
# ${ISOLATED_OUTDIR}/output.json. out-dir is set to ${ISOLATED_OUTDIR}
# TODO(crbug.com/1031338) - the content of this output.json will
# work with Chromium recipe because we use the noop_merge merge script,
# but will require structural changes to support the default gtest
# merge script (ref: //testing/merge_scripts/standard_gtest_merge.py)
output_json_path = (
self.args.test_launcher_summary_output or
os.path.join(self.args.out_dir, 'output.json'))
with open(output_json_path, 'w') as f:
json.dump(tr.test_results, f)
test_runner.defaults_delete('com.apple.CoreSimulator', test_runner.defaults_delete('com.apple.CoreSimulator',
'FramebufferServerRendererPolicy') 'FramebufferServerRendererPolicy')
...@@ -310,6 +325,11 @@ class Runner(): ...@@ -310,6 +325,11 @@ class Runner():
action='store_true', action='store_true',
help='Whether or not the given app should be run as an XCTest.', help='Whether or not the given app should be run as an XCTest.',
) )
parser.add_argument(
'--test-launcher-summary-output',
default=None,
help='Full path to output.json file. output.json is consumed by both '
'collect_task.py and merge scripts.')
def load_from_json(args): def load_from_json(args):
""" """
......
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