]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/go: document that tests run in the source directory
authorRuss Cox <rsc@golang.org>
Thu, 17 Dec 2015 06:04:06 +0000 (01:04 -0500)
committerRuss Cox <rsc@golang.org>
Thu, 17 Dec 2015 17:00:37 +0000 (17:00 +0000)
Fixes #13538.

Change-Id: I621bbe2befe838d16d3664d7a5e30d5d7cceae33
Reviewed-on: https://go-review.googlesource.com/17949
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/go/alldocs.go
src/cmd/go/test.go

index 96aed49ee2817dcfd3f37133ebd69ad1c3582ba2..a83f17ef353131620b623d8aaf78d7dc42214797 100644 (file)
@@ -1486,6 +1486,11 @@ execution, not to the test itself.)
 The test flags that generate profiles (other than for coverage) also
 leave the test binary in pkg.test for use when analyzing the profiles.
 
+When 'go test' runs a test binary, it does so from within the
+corresponding package's source code directory. Depending on the test,
+it may be necessary to do the same when invoking a generated test
+binary directly.
+
 The command-line package list, if present, must appear before any
 flag not known to the go test command. Continuing the example above,
 the package list would have to appear before -myflag, but could appear
index 2010329365f552e5f75434cf171ca446cf7fe1bc..995ba146f5195ed0fe6ac599691b4fd093091ddb 100644 (file)
@@ -256,6 +256,11 @@ execution, not to the test itself.)
 The test flags that generate profiles (other than for coverage) also
 leave the test binary in pkg.test for use when analyzing the profiles.
 
+When 'go test' runs a test binary, it does so from within the 
+corresponding package's source code directory. Depending on the test,
+it may be necessary to do the same when invoking a generated test
+binary directly.
+
 The command-line package list, if present, must appear before any
 flag not known to the go test command. Continuing the example above,
 the package list would have to appear before -myflag, but could appear