Documentation
¶
Index ¶
- func Go1Point() int
- func GoTool() (string, error)
- func GoToolPath(t testing.TB) string
- func HasExternalNetwork() bool
- func HasGoBuild() bool
- func MustHaveExternalNetwork(t testing.TB)
- func MustHaveGoBuild(t testing.TB)
- func NeedsArch(t Testing, arch string)
- func NeedsGo1Point(t Testing, x int)
- func RunThenCrash(coredumpFilter string, f func() any)
- type Testing
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoToolPath ¶
GoToolPath reports the path to the Go tool. It is a convenience wrapper around GoTool. If the tool is unavailable GoToolPath calls t.Skip. If the tool should be available and isn't, GoToolPath calls t.Fatal.
func HasExternalNetwork ¶
func HasExternalNetwork() bool
HasExternalNetwork reports whether the current system can use external (non-localhost) networks.
func HasGoBuild ¶
func HasGoBuild() bool
HasGoBuild reports whether the current system can build programs with “go build” and then run them with os.StartProcess or exec.Command.
func MustHaveExternalNetwork ¶
MustHaveExternalNetwork checks that the current system can use external (non-localhost) networks. If not, MustHaveExternalNetwork calls t.Skip with an explanation.
func MustHaveGoBuild ¶
MustHaveGoBuild checks that the current system can build programs with “go build” and then run them with os.StartProcess or exec.Command. If not, MustHaveGoBuild calls t.Skip with an explanation.
func NeedsGo1Point ¶
NeedsGo1Point skips t if the Go version used to run the test is older than 1.x.
func RunThenCrash ¶
RunThenCrash sets the provided core dump filter (optional) for the process, runs f, then crashes.
The slice returned by f is kept alive across the crash.