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

Commit e387933e authored by Julien Desprez's avatar Julien Desprez
Browse files

patch up a bit of reporting metric logic

Ensure we stop updating the optimized status for the metrics
once we come of a decision.

Change-Id: I14d74ea71cc79f22170d2cf10ca299f5dd2f3c1d
Test: presubmit
Bug: 383118767
parent b3a5c380
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -166,13 +166,15 @@ class BuildPlanner:
          if re.search(regex, opt):
            get_metrics_agent().report_unoptimized_target(target, 'Test artifact used.')
            build_targets.add(target)
            continue
            # proceed to next target evaluation
            break
          get_metrics_agent().report_optimized_target(target)
        except Exception as e:
          # In case of exception report as unoptimized
          build_targets.add(target)
          get_metrics_agent().report_unoptimized_target(target, f'Error in parsing test discovery output for {target}: {repr(e)}')
          logging.error(f'unable to parse test discovery output: {repr(e)}')
          break

    return build_targets