-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: TestExecutableGOROOT fails if GOROOT_FINAL is set #20284
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
Comments
CL https://golang.org/cl/46428 mentions this issue. |
Reopening for Go 1.10, since the test still fails when @broady runs cmd/release. |
Updates #20284 Change-Id: I4d55d6adec4e8efb54285ca27bb4fa39c76582c3 Reviewed-on: https://go-review.googlesource.com/46719 Reviewed-by: Chris Broadfoot <cbro@golang.org>
I'm seeing this (or something close) fail for 1.9beta2 (and 1.9beta1). This is on solaris_amd64 but that shouldn't make any difference. GOROOT_BOOTSTRAP=/usr/versions/go-1.8 GOROOT_FINAL=/usr/versions/go-1.9 ./all.bash results in --- FAIL: TestExecutableGOROOT (0.09s) |
If it's any consolation, you do not need to set GOROOT_FINAL any more,
even when moving your go install after building it
zapf(~/go/src) % mktemp -d
/var/folders/lv/028ssy8n19v56_k2q43kkb5r0000gn/T/tmp.UkpoJoSu
zapf(~/go/src) % cd
zapf(~) % cp -rp go/*
/var/folders/lv/028ssy8n19v56_k2q43kkb5r0000gn/T/tmp.UkpoJoSu
zapf(~) % /var/folders/lv/028ssy8n19v56_k2q43kkb5r0000gn/T/tmp.UkpoJoSu/bin/go
env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/dfc"
GORACE=""
GOROOT="/var/folders/lv/028ssy8n19v56_k2q43kkb5r0000gn/T/tmp.UkpoJoSu"
GOTOOLDIR="/Users/dfc/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics
-Qunused-arguments -fmessage-length=0
-fdebug-prefix-map=/var/folders/lv/028ssy8n19v56_k2q43kkb5r0000gn/T/go-build158555772=/tmp/go-build
-gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
…On Tue, Jun 27, 2017 at 6:06 PM, Peter Tribble ***@***.***> wrote:
I'm seeing this (or something close) fail for 1.9beta2 (and 1.9beta1). This
is on solaris_amd64 but that shouldn't make any difference.
GOROOT_BOOTSTRAP=/usr/versions/go-1.8 GOROOT_FINAL=/usr/versions/go-1.9
./all.bash
results in
--- FAIL: TestExecutableGOROOT (0.09s)
--- FAIL: TestExecutableGOROOT/RelocatedExe (0.01s)
go_test.go:4047: /tmp/gotest187550508/new/bin/go env GOROOT: exit status 2,
go: cannot find GOROOT directory: /usr/versions/go-1.9
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ah. That does appear to be the case. So perhaps the installation instructions and/or release notes need to be updated? |
CL https://golang.org/cl/46719 mentions this issue. |
We need to disable that test for Go 1.9. Will send a CL. |
CL https://golang.org/cl/46830 mentions this issue. |
Test just doesn't work. Updates #20284 Change-Id: I31c3f771e68dcdc471767594a1467e19fbf5fe88 Reviewed-on: https://go-review.googlesource.com/46830 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Andrew Bonventre <andybons@google.com>
You do need to set GOROOT_FINAL in order to get the right default value for runtime.GOROOT. |
Change https://golang.org/cl/82277 mentions this issue: |
Change https://golang.org/cl/86835 mentions this issue: |
What version of Go are you using (
go version
)?$ ../bin/go version
go version devel +88672de Mon May 8 19:52:30 2017 +0000 linux/amd64
What operating system and processor architecture are you using (
go env
)?linux/amd64 but it doesn't really matter here.
What did you do?
$ GOROOT_FINAL=/foobar ./all.bash
What did you expect to see?
Tests passing.
What did you see instead?
--- FAIL: TestExecutableGOROOT (0.05s)
go_test.go:3974: copied go tool failed exit status 2: go: cannot find GOROOT directory: /foobar
FAIL
FAIL cmd/go 51.515s
I think this is the
{{{
// Missing GOROOT/pkg/tool, the go tool should fall back to
// its default path.
}}}
case from the test. The nature of the failure makes me wonder if it is really testing what it thinks it's failing though. cc @crawshaw
The text was updated successfully, but these errors were encountered: