New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmd/go: go test <single file> no longer works with new vendoring support #14842
Comments
What's happening is the single file you provided is being compiled in a I cannot comment on if this is supported behaviour or not, but can tell you On Thu, 17 Mar 2016, 09:37 Bradley, notifications@github.com wrote:
|
Sorry for the delayed questions, but I need to know more about the file tree. What is the import statement at integration/api_test.go line 19? What directory is the go test command being run in? That is, where is the integration directory relative to the command-li/vendor directory? Thanks. |
The import statement is "golang.org/x/net/context" I ran the tests from the base project directory, the vendor and the integration directory are in the directory that I run the tests from. cd wallet-api |
This appears to be fixed. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.6 darwin/amd64
What operating system and processor architecture are you using (
go env
)?go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/Bradley/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GO15VENDOREXPERIMENT="1"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fno-common"
CXX="clang++"
CGO_ENABLED="1"
What did you do?
I am not sure if
go test <single file>
is officially supported but it used to work. If any of the packages imported by the test file are in the new vendor directory I get an error. If none of the packages are in the vendor directory the test runs fine.
What did you expect to see?
I expect it to first print the path to my projects vendor directory, then look in the GOROOT, and then look in the GOPATH.
What did you see instead?
It seems to be manipulating the string wrong to determine the paths for where it is supposed to look.
I can change how we run certain tests regardless but this behavior does not seem correct.
The text was updated successfully, but these errors were encountered: