Commit f9137c53 authored by Russ Cox's avatar Russ Cox

cmd/go: document that tests run in the source directory

Fixes #13538.

Change-Id: I621bbe2befe838d16d3664d7a5e30d5d7cceae33
Reviewed-on: https://go-review.googlesource.com/17949Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent f474885f
...@@ -1486,6 +1486,11 @@ execution, not to the test itself.) ...@@ -1486,6 +1486,11 @@ execution, not to the test itself.)
The test flags that generate profiles (other than for coverage) also The test flags that generate profiles (other than for coverage) also
leave the test binary in pkg.test for use when analyzing the profiles. 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 The command-line package list, if present, must appear before any
flag not known to the go test command. Continuing the example above, flag not known to the go test command. Continuing the example above,
the package list would have to appear before -myflag, but could appear the package list would have to appear before -myflag, but could appear
......
...@@ -256,6 +256,11 @@ execution, not to the test itself.) ...@@ -256,6 +256,11 @@ execution, not to the test itself.)
The test flags that generate profiles (other than for coverage) also The test flags that generate profiles (other than for coverage) also
leave the test binary in pkg.test for use when analyzing the profiles. 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 The command-line package list, if present, must appear before any
flag not known to the go test command. Continuing the example above, flag not known to the go test command. Continuing the example above,
the package list would have to appear before -myflag, but could appear the package list would have to appear before -myflag, but could appear
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment