aboutsummaryrefslogtreecommitdiff
path: root/src/run.bash
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2011-12-20 16:50:13 -0500
committerRuss Cox <rsc@golang.org>2011-12-20 16:50:13 -0500
commit41a6165c030c41cc7e44b28c251b22c49fb9618b (patch)
treef82ea6396bbcb12e35e9269c8156ee21c17aa7b6 /src/run.bash
parentfd1c1b9679a2ed9c96bc3ccd74336ba5b23a5049 (diff)
downloadgo-41a6165c030c41cc7e44b28c251b22c49fb9618b.tar.xz
build: use go command during build
If something goes wrong, it should suffice to set USE_GO_TOOL=false in env.bash to fall back to the makefiles. I will delete the makefiles in January. R=golang-dev, r CC=golang-dev https://golang.org/cl/5502047
Diffstat (limited to 'src/run.bash')
-rwxr-xr-xsrc/run.bash52
1 files changed, 41 insertions, 11 deletions
diff --git a/src/run.bash b/src/run.bash
index e88868a621..90e8797c09 100755
--- a/src/run.bash
+++ b/src/run.bash
@@ -31,23 +31,53 @@ xcd() {
}
if $rebuild; then
+ if $USE_GO_TOOL; then
+ echo
+ echo '# Package builds'
+ GOPATH="" time go install -a all
+ else
+ (xcd pkg
+ gomake clean
+ time gomake install
+ ) || exit $?
+ fi
+fi
+
+if $USE_GO_TOOL; then
+ echo
+ echo '# Package tests'
+ GOPATH="" time go test all -short
+else
(xcd pkg
- gomake clean
- time gomake install
+ gomake testshort
) || exit $?
fi
-(xcd pkg
-gomake testshort
-) || exit $?
+if $USE_GO_TOOL; then
+ echo
+ echo '# runtime -cpu=1,2,4'
+ go test runtime -short -cpu=1,2,4
+else
+ (xcd pkg/runtime;
+ go test -short -cpu=1,2,4
+ ) || exit $?
+fi
-(xcd pkg/runtime;
-gotest -short -cpu=1,2,4
-) || exit $?
+if $USE_GO_TOOL; then
+ echo
+ echo '# sync -cpu=10'
+ go test sync -short -cpu=10
+else
+ (xcd pkg/sync;
+ GOMAXPROCS=10 gomake testshort
+ ) || exit $?
+fi
-(xcd pkg/sync;
-GOMAXPROCS=10 gomake testshort
-) || exit $?
+if $USE_GO_TOOL; then
+ echo
+ echo '# Build bootstrap scripts'
+ ./buildscript.sh
+fi
(xcd pkg/exp/ebnflint
time gomake test