Usage:
- go list [-e] [-f format] [-json] [-tags 'tag list'] [packages]
+ go list [-e] [-race] [-f format] [-json] [-tags 'tag list'] [packages]
List lists the packages named by the import paths, one per line.
The -tags flag specifies a list of build tags, like in the 'go build'
command.
+The -race flag causes the package data to include the dependencies
+required by the race detector.
+
For more about specifying packages, see 'go help packages'.
pkg.test -test.v -test.cpuprofile=prof.out -dir=testdata -update
-The test flags that generate profiles also leave the test binary in pkg.test
-for use when analyzing the profiles.
+The test flags that generate profiles (other than for coverage) also
+leave the test binary in pkg.test for use when analyzing the profiles.
Flags not recognized by 'go test' must be placed after any specified packages.
pkg.test -test.v -test.cpuprofile=prof.out -dir=testdata -update
-The test flags that generate profiles also leave the test binary in pkg.test
-for use when analyzing the profiles.
+The test flags that generate profiles (other than for coverage) also
+leave the test binary in pkg.test for use when analyzing the profiles.
Flags not recognized by 'go test' must be placed after any specified packages.
`,
testCoverPaths []string // -coverpkg flag
testCoverPkgs []*Package // -coverpkg flag
testProfile bool // some profiling flag
+ testNeedBinary bool // profile needs to keep binary around
testI bool // -i flag
testV bool // -v flag
testFiles []string // -file flag(s) TODO: not respected
a.target = filepath.Join(testDir, testBinary) + exeSuffix
pmainAction := a
- if testC || testProfile {
+ if testC || testNeedBinary {
// -c or profiling flag: create action to copy binary to ./test.out.
runAction = &action{
f: (*builder).install,
testTimeout = value
case "blockprofile", "cpuprofile", "memprofile":
testProfile = true
+ testNeedBinary = true
case "coverpkg":
testCover = true
if value == "" {