Commit a0da5a73 authored by Sajjad Mirza's avatar Sajjad Mirza Committed by Commit Bot

[code coverage] Add a --per-cl-coverage flag to merge script.

The code_coverage recipe module will explicitly pass --per-cl-coverage
to the merge script in a per-CL build. Once that is done we can delete
the use of the patch_storage property, which is no longer going to be
set.

Bug: 1050858
Change-Id: Ie4698b313716bb222071b88185759be23c8ba518
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2048904
Commit-Queue: Sajjad Mirza <sajjadm@chromium.org>
Reviewed-by: default avatarYuke Liao <liaoyuke@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743293}
parent aba04089
...@@ -50,6 +50,10 @@ def _MergeAPIArgumentParser(*args, **kwargs): ...@@ -50,6 +50,10 @@ def _MergeAPIArgumentParser(*args, **kwargs):
parser.add_argument( parser.add_argument(
'--merged-jacoco-filename', '--merged-jacoco-filename',
help='filename used to uniquely name the merged exec file.') help='filename used to uniquely name the merged exec file.')
parser.add_argument(
'--per-cl-coverage',
action='store_true',
help='set to indicate that this is a per-CL coverage build')
return parser return parser
...@@ -95,10 +99,12 @@ def main(): ...@@ -95,10 +99,12 @@ def main():
'w') as f: 'w') as f:
json.dump(invalid_profiles, f) json.dump(invalid_profiles, f)
# We don't want to invalidate shards in a CQ build, which we determine by # We don't want to invalidate shards in a CQ build, because we should not
# the existence of the 'patch_storage' property. # interfere with the actual test results of a CQ builder.
build_properties = json.loads(params.build_properties) # TODO(crbug.com/1050858) Remove patch_storage completely once recipe-side
if not build_properties.get('patch_storage'): # change passes --per-cl-coverage.
patch_storage = json.loads(params.build_properties).get('patch_storage')
if not params.per_cl_coverage and not patch_storage:
mark_invalid_shards( mark_invalid_shards(
coverage_merger.get_shards_to_retry(invalid_profiles), coverage_merger.get_shards_to_retry(invalid_profiles),
params.jsons_to_merge) params.jsons_to_merge)
......
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