Upload soong_metrics when mixed build fails

Test:  `m --bazel-mode-dev` and intentionally break the build.
We can see soong_metrics in the output directory and metrics_uploader
executed.

Bug: 268228148
Change-Id: I79e3b11468fca446673ebf752697a99eaff01b0f
This commit is contained in:
Jason Wu 2023-02-08 18:00:33 -05:00
parent 60b3fed203
commit 51d0ad7c30

View file

@ -218,13 +218,13 @@ func main() {
trace.SetOutput(filepath.Join(logsDir, c.logsPrefix+"build.trace"))
c.run(buildCtx, config, args)
if !config.SkipMetricsUpload() {
defer build.UploadMetrics(buildCtx, config, c.simpleOutput, buildStarted, bazelProfileFile, bazelMetricsFile, metricsFiles...)
}
defer met.Dump(soongMetricsFile)
c.run(buildCtx, config, args)
}
func logAndSymlinkSetup(buildCtx build.Context, config build.Config) {