go/src/cmd/go/internal/test/test.go

// Break init loop.
func init() {}

const testUsage

var CmdTest

var HelpTestflag

var HelpTestfunc

var testBench

var testC

var testCoverPkgs

var testCoverProfile

var testFailFast

var testFuzz

var testJSON

var testList

var testO

var testOutputDir

var testShuffle

var testTimeout

var testV

var testVet

type testVFlag

func (*testVFlag) IsBoolFlag() bool {}

func (f *testVFlag) Set(arg string) error {}

func (f *testVFlag) String() string {}

var testArgs

var pkgArgs

var pkgs

var testHelp

var testKillTimeout

var testWaitDelay

var testCacheExpire

var testShouldFailFast

var (
	testBlockProfile
	testCPUProfile
	testMemProfile
	testMutexProfile
	testTrace
)

var testODir

// testProfile returns the name of an arbitrary single-package profiling flag
// that is set, if any.
func testProfile() string {}

// testNeedBinary reports whether the test needs to keep the binary around.
func testNeedBinary() bool {}

// testShowPass reports whether the output for a passing test should be shown.
func testShowPass() bool {}

var defaultVetFlags

func runTest(ctx context.Context, cmd *base.Command, args []string) {}

var windowsBadWords

func builderTest(b *work.Builder, ctx context.Context, pkgOpts load.PackageOpts, p *load.Package, imported bool, writeCoverMetaAct *work.Action) (buildAction, runAction, printAction *work.Action, err error) {}

func addTestVet(b *work.Builder, p *load.Package, runAction, installAction *work.Action) {}

var noTestsToRun

var noFuzzTestsToFuzz

var tooManyFuzzTestsToFuzz

type runTestActor

type runCache

var stdoutMu

type lockedStdout

func (lockedStdout) Write(b []byte) (int, error) {}

func (r *runTestActor) Act(b *work.Builder, ctx context.Context, a *work.Action) error {}

// tryCache is called just before the link attempt,
// to see if the test result is cached and therefore the link is unneeded.
// It reports whether the result can be satisfied from cache.
func (c *runCache) tryCache(b *work.Builder, a *work.Action) bool {}

func (c *runCache) tryCacheWithID(b *work.Builder, a *work.Action, id string) bool {}

var errBadTestInputs

var testlogMagic

// computeTestInputsID computes the "test inputs ID"
// (see comment in tryCacheWithID above) for the
// test log.
func computeTestInputsID(a *work.Action, testlog []byte) (cache.ActionID, error) {}

func hashGetenv(name string) cache.ActionID {}

const modTimeCutoff

var errFileTooNew

func hashOpen(name string) (cache.ActionID, error) {}

func hashStat(name string) cache.ActionID {}

func hashWriteStat(h io.Writer, info fs.FileInfo) {}

// testAndInputKey returns the actual cache key for the pair (testID, testInputsID).
func testAndInputKey(testID, testInputsID cache.ActionID) cache.ActionID {}

func (c *runCache) saveOutput(a *work.Action) {}

// coveragePercentage returns the coverage results (if enabled) for the
// test. It uncovers the data by scanning the output from the test run.
func coveragePercentage(out []byte) string {}

// builderCleanTest is the action for cleaning up after a test.
func builderCleanTest(b *work.Builder, ctx context.Context, a *work.Action) error {}

// builderPrintTest is the action for printing a test result.
func builderPrintTest(b *work.Builder, ctx context.Context, a *work.Action) error {}

// printExitStatus is the action for printing the final exit status.
// If we are running multiple test targets, print a final "FAIL"
// in case a failure in an early package has already scrolled
// off of the user's terminal.
// (See https://golang.org/issue/30507#issuecomment-470593235.)
//
// In JSON mode, we need to maintain valid JSON output and
// we assume that the test output is being parsed by a tool
// anyway, so the failure will not be missed and would be
// awkward to try to wedge into the JSON stream.
//
// In fuzz mode, we only allow a single package for now
// (see CL 350156 and https://golang.org/issue/46312),
// so there is no possibility of scrolling off and no need
// to print the final status.
func printExitStatus(b *work.Builder, ctx context.Context, a *work.Action) error {}

// testBinaryName can be used to create name for test binary executable.
// Use last element of import path, not package name.
// They differ when package name is "main".
// But if the import path is "command-line-arguments",
// like it is during 'go run', use the package name.
func testBinaryName(p *load.Package) string {}