Commit 2aa77c6b authored by Russ Cox's avatar Russ Cox

gotest: remove lingering references to $GOBIN

(Assumed to be in $PATH.  all.bash ensures that
during the main build and the user must ensure it
when running commands like gotest or gomake
by hand.  This belonged in the earlier CL but I missed it.)

R=r
CC=golang-dev
https://golang.org/cl/1967048
parent e3034adf
...@@ -14,8 +14,6 @@ unset LANG ...@@ -14,8 +14,6 @@ unset LANG
export LC_ALL=C export LC_ALL=C
export LC_CTYPE=C export LC_CTYPE=C
GOBIN="${GOBIN:-$HOME/bin}"
_GC=$GC # Make.inc will overwrite this _GC=$GC # Make.inc will overwrite this
if [ ! -f [Mm]akefile ]; then if [ ! -f [Mm]akefile ]; then
...@@ -24,7 +22,7 @@ if [ ! -f [Mm]akefile ]; then ...@@ -24,7 +22,7 @@ if [ ! -f [Mm]akefile ]; then
fi fi
export GOROOT=${GOROOT:-"@@GOROOT@@"} export GOROOT=${GOROOT:-"@@GOROOT@@"}
eval $("$GOBIN"/gomake -j1 --no-print-directory -f "$GOROOT"/src/Make.inc go-env) eval $(gomake -j1 --no-print-directory -f "$GOROOT"/src/Make.inc go-env)
if [ -z "$O" ]; then if [ -z "$O" ]; then
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2 echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
exit 2 exit 2
...@@ -33,11 +31,11 @@ fi ...@@ -33,11 +31,11 @@ fi
E="$GORUN" E="$GORUN"
# Allow overrides # Allow overrides
GC="$GOBIN/${_GC:-$GC} -I _test" GC="${_GC:-$GC} -I _test"
GL="$GOBIN/${GL:-$LD} -L _test" GL="${GL:-$LD} -L _test"
AS="$GOBIN/$AS" AS="$AS"
CC="$GOBIN/$CC" CC="$CC"
LD="$GOBIN/$LD" LD="$LD"
export GC GL O AS CC LD export GC GL O AS CC LD
gofiles="" gofiles=""
...@@ -88,8 +86,8 @@ fi ...@@ -88,8 +86,8 @@ fi
set -e set -e
"$GOBIN"/gomake testpackage-clean gomake testpackage-clean
"$GOBIN"/gomake testpackage "GOTESTFILES=$gofiles" gomake testpackage "GOTESTFILES=$gofiles"
if $havex; then if $havex; then
$GC -o $xofile $xgofiles $GC -o $xofile $xgofiles
fi fi
...@@ -111,18 +109,18 @@ nmgrep() { ...@@ -111,18 +109,18 @@ nmgrep() {
# Figure out pkg. # Figure out pkg.
case "$i" in case "$i" in
*.a) *.a)
pkg=$("$GOBIN"/gopack p $i __.PKGDEF | sed -n 's/^package //p' | sed 's/ .*//' | sed 1q) pkg=$(gopack p $i __.PKGDEF | sed -n 's/^package //p' | sed 's/ .*//' | sed 1q)
;; ;;
*) *)
pkg=$(sed -n 's/^ .* in package "\(.*\)".*/\1/p' $i | sed 1q) pkg=$(sed -n 's/^ .* in package "\(.*\)".*/\1/p' $i | sed 1q)
;; ;;
esac esac
"$GOBIN"/6nm -s "$i" | egrep ' T .*\.'"$pat"'$' | 6nm -s "$i" | egrep ' T .*\.'"$pat"'$' |
sed 's/.* //; /\..*\./d; s/""\./'"$pkg"'./g' sed 's/.* //; /\..*\./d; s/""\./'"$pkg"'./g'
done done
} }
importpath=$("$GOBIN"/gomake -s importpath) importpath=$(gomake -s importpath)
{ {
# test functions are named TestFoo # test functions are named TestFoo
# the grep -v eliminates methods and other special names # the grep -v eliminates methods and other special names
......
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