mirror of
https://github.com/golang/go
synced 2024-11-05 15:26:15 -07:00
f9197a7043
https://golang.org/doc/contribute.html#quick_test currently suggests running 'make.bash' and 'run.bash' separately, but 'run.bash' potentially uses a 'go' command resolved from the wrong GOROOT, which in turn sets the wrong GOROOT for further commands. Updates #32674 Updates #17896 Change-Id: I4925d478d0fc7351c4f6d40830ab17d4d688348d Reviewed-on: https://go-review.googlesource.com/c/go/+/223741 Run-TryBot: Bryan C. Mills <bcmills@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
22 lines
567 B
Bash
Executable File
22 lines
567 B
Bash
Executable File
#!/bin/rc -e
|
|
# Copyright 2012 The Go Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style
|
|
# license that can be found in the LICENSE file.
|
|
|
|
rfork e
|
|
|
|
if(! test -f ../bin/go){
|
|
echo 'run.rc must be run from $GOROOT/src after installing cmd/go' >[1=2]
|
|
exit wrongdir
|
|
}
|
|
|
|
eval `{../bin/go env}
|
|
|
|
GOPATH = () # we disallow local import for non-local packages, if $GOROOT happens
|
|
# to be under $GOPATH, then some tests below will fail
|
|
GOBIN = () # Issue 14340
|
|
GOFLAGS = ()
|
|
GO111MODULE = ()
|
|
|
|
exec ../bin/go tool dist test -rebuild $*
|