(t *testing.T, args ...string)
| 23 | ) |
| 24 | |
| 25 | func cmdTestwrapper(t *testing.T, args ...string) *exec.Cmd { |
| 26 | buildOnce.Do(func() { |
| 27 | buildPath, buildErr = buildTestWrapper() |
| 28 | }) |
| 29 | if buildErr != nil { |
| 30 | t.Fatalf("building testwrapper: %s", buildErr) |
| 31 | } |
| 32 | cmd := exec.Command(buildPath, args...) |
| 33 | // Tests of testwrapper run with a small per-test budget so they don't |
| 34 | // take 10 minutes when checking permanent-failure behavior. |
| 35 | cmd.Env = append(os.Environ(), |
| 36 | "TS_TESTWRAPPER_BUDGET=2s", |
| 37 | "TS_TESTWRAPPER_MIN_RETRIES=2", |
| 38 | "GITHUB_REPOSITORY=tailscale/tailscale", |
| 39 | ) |
| 40 | return cmd |
| 41 | } |
| 42 | |
| 43 | func buildTestWrapper() (string, error) { |
| 44 | dir, err := os.MkdirTemp("", "testwrapper") |
no test coverage detected
searching dependent graphs…