Skip to content
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: TestMissingGOPATHEnvShowsDefault fails if srcDir == defaultGOPATH on windows #18726

Closed
hirochachacha opened this issue Jan 20, 2017 · 3 comments
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Milestone

Comments

@hirochachacha
Copy link
Contributor

hirochachacha commented Jan 20, 2017

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go version go1.7.3 windows/amd64

What operating system and processor architecture are you using (go env)?

set GOARCH=amd64
set GOBIN=
set GOEXE=.exe
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GOOS=windows
set GOPATH=C:\Users\Hiroshi\gopath
set GORACE=
set GOROOT=C:\Go
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set CC=gcc
set GOGCCFLAGS=-m64 -mthreads -fmessage-length=0 -fdebug-prefix-map=C:\Users\Hiroshi\AppData\Local\Temp\go-build344340558=/tmp/go-build -gno-record-gcc-switches
set CXX=g++
set CGO_ENABLED=1

What did you do?

move tip source code to default GOPATH (C:\Users\Hiroshi\go)
run all.bat

What did you expect to see?

no errors.

What did you see instead?

 --- FAIL: TestMissingGOPATHEnvShowsDefault (0.62s)
             go_test.go:260: running testgo [env GOPATH]
             go_test.go:275: standard output:
             go_test.go:276:

             go_test.go:1697: got ""; want "C:\\Users\\Hiroshi\\go"

FWIW, I don't see this error on OS X.

@bradfitz
Copy link
Contributor

I suppose we could at least fail with a better error message saying to not put your GOROOT in your GOPATH.

@bradfitz bradfitz added this to the Go1.9 milestone Jan 20, 2017
@bradfitz bradfitz added help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure. labels Jan 20, 2017
@gopherbot
Copy link

CL https://golang.org/cl/36072 mentions this issue.

@hirochachacha
Copy link
Contributor Author

Fixed by 57d06ff.

@golang golang locked and limited conversation to collaborators Feb 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge help wanted NeedsFix The path to resolution is known, but the work has not been done. Testing An issue that has been verified to require only test changes, not just a test failure.
Projects
None yet
Development

No branches or pull requests

3 participants