summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-08-18 10:08:49 -0400
committerRuss Cox <rsc@golang.org>2010-08-18 10:08:49 -0400
commitd5a213c027d18c2c8de4b869af2b6839badb3871 (patch)
treefce12a0753dcdb206ec0d64d571afcfc1711145c /test
parentae4b93f1aa082f2529247d0eddcc5a04ffa71564 (diff)
downloadgo-d5a213c027d18c2c8de4b869af2b6839badb3871.tar.gz
build: no required environment variables
R=adg, r, PeterGo CC=golang-dev http://codereview.appspot.com/1942044
Diffstat (limited to 'test')
-rwxr-xr-xtest/bench/timing.sh2
-rw-r--r--test/garbage/Makefile2
-rw-r--r--test/garbage/parser.go2
-rwxr-xr-xtest/run4
4 files changed, 6 insertions, 4 deletions
diff --git a/test/bench/timing.sh b/test/bench/timing.sh
index 5cd82dfd9..3e54de2d7 100755
--- a/test/bench/timing.sh
+++ b/test/bench/timing.sh
@@ -7,7 +7,7 @@ set -e
GOBIN="${GOBIN:-$HOME/bin}"
-. "$GOROOT"/src/Make.$GOARCH
+eval $("$GOBIN"/gomake --no-print-directory -f ../../src/Make.inc go-env)
PATH=.:$PATH
mode=run
diff --git a/test/garbage/Makefile b/test/garbage/Makefile
index 1a5062b44..ab29e0956 100644
--- a/test/garbage/Makefile
+++ b/test/garbage/Makefile
@@ -2,7 +2,7 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include ../../src/Make.$(GOARCH)
+include ../../src/Make.inc
ALL=\
parser\
diff --git a/test/garbage/parser.go b/test/garbage/parser.go
index 75bcf9aef..6619f6f88 100644
--- a/test/garbage/parser.go
+++ b/test/garbage/parser.go
@@ -74,7 +74,7 @@ func main() {
flag.Parse()
var t0 int64
- pkgroot := os.Getenv("GOROOT") + "/src/pkg/"
+ pkgroot := runtime.GOROOT() + "/src/pkg/"
for pass := 0; pass < 2; pass++ {
// Once the heap is grown to full size, reset counters.
// This hides the start-up pauses, which are much smaller
diff --git a/test/run b/test/run
index d2c6b4dc9..2ce31d5a0 100755
--- a/test/run
+++ b/test/run
@@ -3,7 +3,9 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-export E=""
+GOBIN="${GOBIN:-$HOME/bin}"
+eval $("$GOBIN"/gomake --no-print-directory -f ../src/Make.inc go-env)
+
case X"$GOARCH" in
Xamd64)
export A=6