MCPcopy
hub / github.com/tailscale/tailscale / cmdTestwrapper

Function cmdTestwrapper

cmd/testwrapper/testwrapper_test.go:25–41  ·  view source on GitHub ↗
(t *testing.T, args ...string)

Source from the content-addressed store, hash-verified

23)
24
25func 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
43func buildTestWrapper() (string, error) {
44 dir, err := os.MkdirTemp("", "testwrapper")

Callers 8

TestRetryFunction · 0.85
TestAutoRetryFunction · 0.85
TestPermanentFailureFunction · 0.85
TestBuildErrorFunction · 0.85
TestTimeoutFunction · 0.85
TestCachedFunction · 0.85

Calls 4

buildTestWrapperFunction · 0.85
EnvironMethod · 0.80
DoMethod · 0.65
FatalfMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…