summaryrefslogtreecommitdiff
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
commit2839e4ffce84dbcc2ad9727db402c709071d93b5 (patch)
treed4a23650daf8be1859be9db39e359e4e5d180381 /src/run.bash
parentacfe3456faa74edc6bba46a05da64bda68b627bc (diff)
downloadgo-2839e4ffce84dbcc2ad9727db402c709071d93b5.tar.gz
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 http://codereview.appspot.com/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 e88868a62..90e8797c0 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