aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-08-24 21:56:32 -0400
committerRuss Cox <rsc@golang.org>2010-08-24 21:56:32 -0400
commit2aa77c6b938a5e048da39335bdc5ff6a882f6890 (patch)
treea63b97106e179a64e8d4713ae110b994ae3108b4
parente3034adfc23f7b62f0dd4a09f67b3e87b5300ef4 (diff)
downloadgo-2aa77c6b938a5e048da39335bdc5ff6a882f6890.tar.gz
go-2aa77c6b938a5e048da39335bdc5ff6a882f6890.zip
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
-rwxr-xr-xsrc/cmd/gotest/gotest24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/cmd/gotest/gotest b/src/cmd/gotest/gotest
index fcebf044ed..7cc931b2cb 100755
--- a/src/cmd/gotest/gotest
+++ b/src/cmd/gotest/gotest
@@ -14,8 +14,6 @@ unset LANG
export LC_ALL=C
export LC_CTYPE=C
-GOBIN="${GOBIN:-$HOME/bin}"
-
_GC=$GC # Make.inc will overwrite this
if [ ! -f [Mm]akefile ]; then
@@ -24,7 +22,7 @@ if [ ! -f [Mm]akefile ]; then
fi
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
echo 'missing $O - maybe no Make.$GOARCH?' 1>&2
exit 2
@@ -33,11 +31,11 @@ fi
E="$GORUN"
# Allow overrides
-GC="$GOBIN/${_GC:-$GC} -I _test"
-GL="$GOBIN/${GL:-$LD} -L _test"
-AS="$GOBIN/$AS"
-CC="$GOBIN/$CC"
-LD="$GOBIN/$LD"
+GC="${_GC:-$GC} -I _test"
+GL="${GL:-$LD} -L _test"
+AS="$AS"
+CC="$CC"
+LD="$LD"
export GC GL O AS CC LD
gofiles=""
@@ -88,8 +86,8 @@ fi
set -e
-"$GOBIN"/gomake testpackage-clean
-"$GOBIN"/gomake testpackage "GOTESTFILES=$gofiles"
+gomake testpackage-clean
+gomake testpackage "GOTESTFILES=$gofiles"
if $havex; then
$GC -o $xofile $xgofiles
fi
@@ -111,18 +109,18 @@ nmgrep() {
# Figure out pkg.
case "$i" in
*.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)
;;
esac
- "$GOBIN"/6nm -s "$i" | egrep ' T .*\.'"$pat"'$' |
+ 6nm -s "$i" | egrep ' T .*\.'"$pat"'$' |
sed 's/.* //; /\..*\./d; s/""\./'"$pkg"'./g'
done
}
-importpath=$("$GOBIN"/gomake -s importpath)
+importpath=$(gomake -s importpath)
{
# test functions are named TestFoo
# the grep -v eliminates methods and other special names