summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Luca Farsi <lucafarsi@google.com> 2024-11-18 11:59:43 -0800
committer Luca Farsi <lucafarsi@google.com> 2024-11-18 13:57:36 -0800
commitb44af1747c82c273cb360fd6ca85febae3e34ae5 (patch)
tree37e5368cc37df94830d9105e6ef1278550b9d99b
parent5e393bc8c4a656c468621ff7fc793ed3e7b9d8e4 (diff)
Report optimized/unoptimized targets correctly
Always report every target that gets built as unoptimized, and only report targets that wouldn't get built as optimized. Previously when test discovery succeeded only targets that get built were getting reported (as optimized when those were the unoptimized ones), and targets that wouldn't get built were not being reported at all (when those would be the optimized targets). Test: Presubmit Bug: 372973116 Change-Id: I0b22b57654bba90d9eb398651b09ae0f65df0d5c
-rw-r--r--ci/build_test_suites.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ci/build_test_suites.py b/ci/build_test_suites.py
index cd9d76d23b..4d3b5467dd 100644
--- a/ci/build_test_suites.py
+++ b/ci/build_test_suites.py
@@ -89,6 +89,8 @@ class BuildPlanner:
else:
regex = r'\b(%s)\b' % re.escape(target)
if any(re.search(regex, opt) for opt in test_discovery_zip_regexes):
+ get_metrics_agent().report_unoptimized_target(target, 'Test artifact used.')
+ else:
get_metrics_agent().report_optimized_target(target)
if self._unused_target_exclusion_enabled(