()
| 41 | } |
| 42 | |
| 43 | func buildTestWrapper() (string, error) { |
| 44 | dir, err := os.MkdirTemp("", "testwrapper") |
| 45 | if err != nil { |
| 46 | return "", fmt.Errorf("making temp dir: %w", err) |
| 47 | } |
| 48 | _, err = exec.Command("go", "build", "-o", dir, ".").Output() |
| 49 | if err != nil { |
| 50 | return "", fmt.Errorf("go build: %w", err) |
| 51 | } |
| 52 | return filepath.Join(dir, "testwrapper"), nil |
| 53 | } |
| 54 | |
| 55 | // TestRetry covers a Mark()'d test that fails on the first attempt and passes |
| 56 | // on retry: the wrapper must exit 0, emit a flakytest failures JSON line with |
no test coverage detected
searching dependent graphs…