go/src/cmd/go/go_test.go

func init() {}

var canRace

var canMSan

var canASan

var (
	goHostOS
	goHostArch
)

var cgoEnabled

var netTestSem

var exeSuffix

func tooSlow(t *testing.T, reason string) {}

var testGOROOT

var testGOCACHE

var testGo

var testTmpDir

var testBin

// The TestMain function creates a go command for testing purposes and
// deletes it after the tests have been run.
func TestMain(m *testing.M) {}

func isAlpineLinux() bool {}

var mtimeTick

type testgoData

// skipIfGccgo skips the test if using gccgo.
func skipIfGccgo(t *testing.T, msg string) {}

// testgo sets up for a test that runs testgo.
func testgo(t *testing.T) *testgoData {}

// must gives a fatal error if err is not nil.
func (tg *testgoData) must(err error) {}

// check gives a test non-fatal error if err is not nil.
func (tg *testgoData) check(err error) {}

// parallel runs the test in parallel by calling t.Parallel.
func (tg *testgoData) parallel() {}

// pwd returns the current directory.
func (tg *testgoData) pwd() string {}

// sleep sleeps for one tick, where a tick is a conservative estimate
// of how long it takes for a file modification to get a different
// mtime.
func (tg *testgoData) sleep() {}

// setenv sets an environment variable to use when running the test go
// command.
func (tg *testgoData) setenv(name, val string) {}

// unsetenv removes an environment variable.
func (tg *testgoData) unsetenv(name string) {}

func (tg *testgoData) goTool() string {}

// doRun runs the test go command, recording stdout and stderr and
// returning exit status.
func (tg *testgoData) doRun(args []string) error {}

// run runs the test go command, and expects it to succeed.
func (tg *testgoData) run(args ...string) {}

// runFail runs the test go command, and expects it to fail.
func (tg *testgoData) runFail(args ...string) {}

// getStdout returns standard output of the testgo run as a string.
func (tg *testgoData) getStdout() string {}

// getStderr returns standard error of the testgo run as a string.
func (tg *testgoData) getStderr() string {}

// doGrepMatch looks for a regular expression in a buffer, and returns
// whether it is found. The regular expression is matched against
// each line separately, as with the grep command.
func (tg *testgoData) doGrepMatch(match string, b *bytes.Buffer) bool {}

// doGrep looks for a regular expression in a buffer and fails if it
// is not found. The name argument is the name of the output we are
// searching, "output" or "error". The msg argument is logged on
// failure.
func (tg *testgoData) doGrep(match string, b *bytes.Buffer, name, msg string) {}

// grepStdout looks for a regular expression in the test run's
// standard output and fails, logging msg, if it is not found.
func (tg *testgoData) grepStdout(match, msg string) {}

// grepStderr looks for a regular expression in the test run's
// standard error and fails, logging msg, if it is not found.
func (tg *testgoData) grepStderr(match, msg string) {}

// grepBoth looks for a regular expression in the test run's standard
// output or stand error and fails, logging msg, if it is not found.
func (tg *testgoData) grepBoth(match, msg string) {}

// doGrepNot looks for a regular expression in a buffer and fails if
// it is found. The name and msg arguments are as for doGrep.
func (tg *testgoData) doGrepNot(match string, b *bytes.Buffer, name, msg string) {}

// grepStdoutNot looks for a regular expression in the test run's
// standard output and fails, logging msg, if it is found.
func (tg *testgoData) grepStdoutNot(match, msg string) {}

// grepStderrNot looks for a regular expression in the test run's
// standard error and fails, logging msg, if it is found.
func (tg *testgoData) grepStderrNot(match, msg string) {}

// grepBothNot looks for a regular expression in the test run's
// standard output or standard error and fails, logging msg, if it is
// found.
func (tg *testgoData) grepBothNot(match, msg string) {}

// doGrepCount counts the number of times a regexp is seen in a buffer.
func (tg *testgoData) doGrepCount(match string, b *bytes.Buffer) int {}

// grepCountBoth returns the number of times a regexp is seen in both
// standard output and standard error.
func (tg *testgoData) grepCountBoth(match string) int {}

// creatingTemp records that the test plans to create a temporary file
// or directory. If the file or directory exists already, it will be
// removed. When the test completes, the file or directory will be
// removed if it exists.
func (tg *testgoData) creatingTemp(path string) {}

// makeTempdir makes a temporary directory for a run of testgo. If
// the temporary directory was already created, this does nothing.
func (tg *testgoData) makeTempdir() {}

// tempFile adds a temporary file for a run of testgo.
func (tg *testgoData) tempFile(path, contents string) {}

// tempDir adds a temporary directory for a run of testgo.
func (tg *testgoData) tempDir(path string) {}

// path returns the absolute pathname to file with the temporary
// directory.
func (tg *testgoData) path(name string) string {}

// mustExist fails if path does not exist.
func (tg *testgoData) mustExist(path string) {}

// mustNotExist fails if path exists.
func (tg *testgoData) mustNotExist(path string) {}

// wantExecutable fails with msg if path is not executable.
func (tg *testgoData) wantExecutable(path, msg string) {}

// isStale reports whether pkg is stale, and why
func (tg *testgoData) isStale(pkg string) (bool, string) {}

// wantStale fails with msg if pkg is not stale.
func (tg *testgoData) wantStale(pkg, reason, msg string) {}

// wantNotStale fails with msg if pkg is stale.
func (tg *testgoData) wantNotStale(pkg, reason, msg string) {}

var testWork

// cleanup cleans up a test that runs testgo.
func (tg *testgoData) cleanup() {}

func removeAll(dir string) error {}

func TestNewReleaseRebuildsStalePackagesInGOPATH(t *testing.T) {}

func TestPackageMainTestCompilerFlags(t *testing.T) {}

// Issue 4104.
func TestGoTestWithPackageListedMultipleTimes(t *testing.T) {}

func TestGoListHasAConsistentOrder(t *testing.T) {}

func TestGoListStdDoesNotIncludeCommands(t *testing.T) {}

func TestGoListCmdOnlyShowsCommands(t *testing.T) {}

func TestGoListDeps(t *testing.T) {}

func TestGoListTest(t *testing.T) {}

func TestGoListCompiledCgo(t *testing.T) {}

func TestGoListExport(t *testing.T) {}

// Issue 4096. Validate the output of unsuccessful go install foo/quxx.
func TestUnsuccessfulGoInstallShouldMentionMissingPackage(t *testing.T) {}

func TestGOROOTSearchFailureReporting(t *testing.T) {}

func TestMultipleGOPATHEntriesReportedSeparately(t *testing.T) {}

// Test (from $GOPATH) annotation is reported for the first GOPATH entry,
func TestMentionGOPATHInFirstGOPATHEntry(t *testing.T) {}

// but not on the second.
func TestMentionGOPATHNotOnSecondEntry(t *testing.T) {}

func homeEnvName() string {}

func tempEnvName() string {}

func pathEnvName() string {}

func TestDefaultGOPATH(t *testing.T) {}

func TestDefaultGOPATHPrintedSearchList(t *testing.T) {}

func TestLdflagsArgumentsWithSpacesIssue3941(t *testing.T) {}

func TestLdFlagsLongArgumentsIssue42295(t *testing.T) {}

func TestGoTestDashCDashOControlsBinaryLocation(t *testing.T) {}

func TestGoTestDashOWritesBinary(t *testing.T) {}

// Issue 4515.
func TestInstallWithTags(t *testing.T) {}

// Issue 17451, 17662.
func TestSymlinkWarning(t *testing.T) {}

func TestCgoShowsFullPathNames(t *testing.T) {}

func TestCgoHandlesWlORIGIN(t *testing.T) {}

func TestCgoPkgConfig(t *testing.T) {}

func TestListTemplateContextFunction(t *testing.T) {}

// Test that you cannot use a local import in a package
// accessed by a non-local import (found in a GOPATH/GOROOT).
// See golang.org/issue/17475.
func TestImportLocal(t *testing.T) {}

func TestGoInstallPkgdir(t *testing.T) {}

// For issue 14337.
func TestParallelTest(t *testing.T) {}

func TestBinaryOnlyPackages(t *testing.T) {}

// Issue 16050 and 21884.
func TestLinkSysoFiles(t *testing.T) {}

// Issue 16120.
func TestGenerateUsesBuildContext(t *testing.T) {}

func TestGoEnv(t *testing.T) {}

const noMatchesPattern

const okPattern

// Issue 18044.
func TestLdBindNow(t *testing.T) {}

// Issue 18225.
// This is really a cmd/asm issue but this is a convenient place to test it.
func TestConcurrentAsm(t *testing.T) {}

// Issue 18975.
func TestFFLAGS(t *testing.T) {}

// Issue 19198.
// This is really a cmd/link issue but this is a convenient place to test it.
func TestDuplicateGlobalAsmSymbols(t *testing.T) {}

func copyFile(src, dst string, perm fs.FileMode) error {}

func TestNeedVersion(t *testing.T) {}

func TestBuildmodePIE(t *testing.T) {}

func TestWindowsDefaultBuildmodIsPIE(t *testing.T) {}

func testBuildmodePIE(t *testing.T, useCgo, setBuildmodeToPIE bool) {}

func TestUpxCompression(t *testing.T) {}

var gocacheverify

func TestCacheListStale(t *testing.T) {}

func TestCacheCoverage(t *testing.T) {}

func TestIssue22588(t *testing.T) {}

func TestIssue22531(t *testing.T) {}

func TestIssue22596(t *testing.T) {}

func TestTestCache(t *testing.T) {}

func TestTestSkipVetAfterFailedBuild(t *testing.T) {}

func TestTestVetRebuild(t *testing.T) {}

func TestInstallDeps(t *testing.T) {}

// Issue 22986.
func TestImportPath(t *testing.T) {}

func TestBadCommandLines(t *testing.T) {}

func TestTwoPkgConfigs(t *testing.T) {}

func TestCgoCache(t *testing.T) {}

// Issue 23982
func TestFilepathUnderCwdFormat(t *testing.T) {}

// Issue 24396.
func TestDontReportRemoveOfEmptyDir(t *testing.T) {}

// Issue 24704.
func TestLinkerTmpDirIsDeleted(t *testing.T) {}

// Issue 25093.
func TestCoverpkgTestOnly(t *testing.T) {}

// Regression test for golang.org/issue/34499: version command should not crash
// when executed in a deleted directory on Linux.
func TestExecInDeletedDir(t *testing.T) {}