package testenv
Import Path
internal/testenv (on golang.org and go.dev)
Dependency Relation
imports 11 packages, and imported by 0 packages
Involved Source Files
d-> testenv.go
testenv_notwin.go
Exported Values
func
Builder()
string
Builder reports the name of the builder running this test
(for example, "linux-amd64" or "windows-386-gce").
If the test is not running on the build infrastructure,
Builder returns the empty string.
func
CleanCmdEnv(cmd *
exec.
Cmd) *
exec.
Cmd
CleanCmdEnv will fill cmd.Env with the environment, excluding certain
variables that could modify the behavior of the Go tools such as
GODEBUG and GOTRACEBACK.
func
HasCGO()
bool
HasCGO reports whether the current system can use cgo.
func
HasExec()
bool
HasExec reports whether the current system can start new processes
using os.StartProcess or (more commonly) exec.Command.
func
HasExternalNetwork()
bool
HasExternalNetwork reports whether the current system can use
external (non-localhost) networks.
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
HasGoRun()
bool
HasGoRun reports whether the current system can run programs with ``go run.''
func
HasLink()
bool
HasLink reports whether the current system can use os.Link.
func
HasSrc()
bool
HasSrc reports whether the entire source tree is available under GOROOT.
func
HasSymlink()
bool
HasSymlink reports whether the current system can use os.Symlink.
func
MustHaveExec(t
testing.
TB)
MustHaveExec checks that the current system can start new processes
using os.StartProcess or (more commonly) exec.Command.
If not, MustHaveExec calls t.Skip with an explanation.
func
MustHaveExecPath(t
testing.
TB, path
string)
MustHaveExecPath checks that the current system can start the named executable
using os.StartProcess or (more commonly) exec.Command.
If not, MustHaveExecPath calls t.Skip with an explanation.
func
MustHaveExternalNetwork(t
testing.
TB)
MustHaveExternalNetwork checks that the current system can use
external (non-localhost) networks.
If not, MustHaveExternalNetwork calls t.Skip with an explanation.
func
MustHaveGoBuild(t
testing.
TB)
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
MustHaveGoRun(t
testing.
TB)
MustHaveGoRun checks that the current system can run programs with ``go run.''
If not, MustHaveGoRun calls t.Skip with an explanation.
func
MustHaveLink(t
testing.
TB)
MustHaveLink reports whether the current system can use os.Link.
If not, MustHaveLink calls t.Skip with an explanation.
func
MustHaveSymlink(t
testing.
TB)
MustHaveSymlink reports whether the current system can use os.Symlink.
If not, MustHaveSymlink calls t.Skip with an explanation.