Commit 12cd2776 authored by zhaoyangli's avatar zhaoyangli Committed by Commit Bot

[code coverage] Do not remove input when merging multiple profdata to one.

When we process multiple test types' coverage data, profdata files from
each test target will be used multiple times for different test types.
So these can't be removed after a merge.

Bug: 1064785
Change-Id: I28b92ec5d721192b20781a432ec8d90edbad74b3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2132672
Commit-Queue: Zhaoyang Li <zhaoyangli@chromium.org>
Reviewed-by: default avatarSajjad Mirza <sajjadm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#755517}
parent 48138e90
......@@ -280,9 +280,12 @@ def merge_profiles(input_dir,
profile_output_file_path=output_file,
profdata_tool_path=profdata_tool_path)
# Remove inputs, as they won't be needed and they can be pretty large.
for input_file in profile_input_file_paths:
os.remove(input_file)
# Remove inputs when merging profraws as they won't be needed and they can be
# pretty large. If the inputs are profdata files, do not remove them as they
# might be used again for multiple test types coverage.
if input_extension == '.profraw':
for input_file in profile_input_file_paths:
os.remove(input_file)
return invalid_profraw_files + invalid_profdata_files, counter_overflows
......
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