add coverage completion marker regardless of unit test failure
Coverage completion marker is used in pre-submit workflow to find
most recent healthy post-submit coverage result as a basis for comparison.
We are adding the marker now regardless of unit test failure, to prevent
stale comparison baseline
@@ -51,10 +51,10 @@ func runProfiling(covTargets []string, localArts *LocalArtifacts) {
if errCmdOutput != nil {
log.Printf("Error running 'go test -coverprofile ': error='%v'; combined output='%s'\n",
errCmdOutput, output)
- } else {
+ }
+
log.Printf("coverage profile created @ '%s'", localArts.ProfilePath())
covIo.CreateMarker(localArts.Directory(), CovProfileCompletionMarker)
- }
stdoutPath := localArts.CovStdoutPath()
stdoutFile, err := os.Create(stdoutPath)
