Skip to content

Commit 4fdc50f

Browse files
committed
fix(gorunner): workaround for cache race in 'go tool covdata'
- Issue: golang/go#78777
1 parent 6c40030 commit 4fdc50f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

pkg/runner/go/test.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ func (r *GoTestRunner) Run(ctx runner.IContext) error {
9999
return err
100100
}
101101

102+
//FIXME: Somehow we have a cache write/exec race problem with the
103+
// `go tool covdata` binary.
104+
// Ref: https://github.com/golang/go/issues/78777
105+
// Run dummy command to make the tool cached...
106+
log.Info("Cache 'go tool covdata'. (workaround).")
107+
_, err = goctx.Get("tool", "covdata", "pkglist", "-i", ".")
108+
if err != nil {
109+
return err
110+
}
111+
102112
// TODO: Run `go test` over `grc --config root_dir/tools/config/grc/...` to colorize.
103113
// Issue: https://gitlab.com/data-custodian/custodian/-/issues/194
104114
log.Info("Run Go test.")

0 commit comments

Comments
 (0)