Report required build target as such in metrics
Those are the targets that should never be removed
Change-Id: Ifcba91d044bafc9d8be717e0d8871b6b96e86439
Test: presubmit
Bug: 383118767
diff --git a/ci/build_test_suites.py b/ci/build_test_suites.py
index 443e872..88630ba 100644
--- a/ci/build_test_suites.py
+++ b/ci/build_test_suites.py
@@ -112,6 +112,9 @@
if optimization_rationale:
get_metrics_agent().report_unoptimized_target(target, optimization_rationale)
continue
+ if target in REQUIRED_BUILD_TARGETS:
+ get_metrics_agent().report_unoptimized_target(target, 'Required build target.')
+ continue
try:
regex = r'\b(%s.*)\b' % re.escape(target)
if any(re.search(regex, opt) for opt in test_discovery_zip_regexes):
@@ -154,6 +157,7 @@
for target in self.args.extra_targets:
if target in REQUIRED_BUILD_TARGETS:
build_targets.add(target)
+ get_metrics_agent().report_unoptimized_target(target, 'Required build target.')
continue
regex = r'\b(%s.*)\b' % re.escape(target)