testenv

package
v0.0.0-...-5f96e96 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 3, 2016 License: BSD-3-Clause, MIT Imports: 8 Imported by: 0

Documentation

Overview

Package testenv provides information about what functionality is available in different testing environments run by the Go team.

It is an internal package because these details are specific to the Go team's test setup (on build.golang.org) and not fundamental to tests in general.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Builder

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 GoToolPath

func GoToolPath(t *testing.T) string

GoToolPath reports the path to the Go tool. If the tool is unavailable GoToolPath calls t.Skip. If the tool should be available and isn't, GoToolPath calls t.Fatal.

func HasExec

func HasExec() bool

HasExec reports whether the current system can start new processes using os.StartProcess or (more commonly) exec.Command.

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 HasGoRun

func HasGoRun() bool

HasGoRun reports whether the current system can run programs with “go run.”

func MustHaveExec

func MustHaveExec(t *testing.T)

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 MustHaveExternalNetwork

func MustHaveExternalNetwork(t *testing.T)

MustHaveExternalNetwork checks that the current system can use external (non-localhost) networks. If not, MustHaveExternalNetwork calls t.Skip with an explanation.

func MustHaveGoBuild

func MustHaveGoBuild(t *testing.T)

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

func MustHaveGoRun(t *testing.T)

MustHaveGoRun checks that the current system can run programs with “go run.” If not, MustHaveGoRun calls t.Skip with an explanation.

func SkipFlaky

func SkipFlaky(t *testing.T, issue int)

func SkipFlakyNet

func SkipFlakyNet(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL