Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1075a6be authored by Julien Desprez's avatar Julien Desprez
Browse files

Report required build target as such in metrics

Those are the targets that should never be removed

Change-Id: Ifcba91d044bafc9d8be717e0d8871b6b96e86439
Test: presubmit
Bug: 383118767
parent 81f12b92
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -112,6 +112,9 @@ class BuildPlanner:
        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 @@ class BuildPlanner:
    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)