Merge pull request #2508 from crazy-max/integration-tests-coverage

test: setup integration tests coverage
This commit is contained in:
Tõnis Tiigi
2024-06-13 10:10:32 -07:00
committed by GitHub
6 changed files with 67 additions and 7 deletions

View File

@@ -66,6 +66,10 @@ func buildxCmd(sb integration.Sandbox, opts ...cmdOpt) *exec.Cmd {
if isExperimental() {
cmd.Env = append(cmd.Env, "BUILDX_EXPERIMENTAL=1")
}
if v := os.Getenv("GO_TEST_COVERPROFILE"); v != "" {
coverDir := filepath.Join(filepath.Dir(v), "helpers")
cmd.Env = append(cmd.Env, "GOCOVERDIR="+coverDir)
}
return cmd
}