diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-09-13 13:13:40 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-09-13 13:13:40 +0200 |
commit | 5ff4c17907d5b19510a62e08fd8d3b11e62b431d (patch) | |
tree | c0650497e988f47be9c6f2324fa692a52dea82e1 /src/run.bash | |
parent | 80f18fc933cf3f3e829c5455a1023d69f7b86e52 (diff) | |
download | golang-upstream/60.tar.gz |
Imported Upstream version 60upstream/60
Diffstat (limited to 'src/run.bash')
-rwxr-xr-x | src/run.bash | 102 |
1 files changed, 102 insertions, 0 deletions
diff --git a/src/run.bash b/src/run.bash new file mode 100755 index 000000000..a9689bf15 --- /dev/null +++ b/src/run.bash @@ -0,0 +1,102 @@ +#!/usr/bin/env bash +# Copyright 2009 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +set -e +if [ "$1" = "--no-env" ]; then + # caller has already run env.bash + shift +else + . ./env.bash +fi + +unset MAKEFLAGS # single-threaded make +unset CDPATH # in case user has it set + +# no core files, please +ulimit -c 0 + +# allow make.bash to avoid double-build of everything +rebuild=true +if [ "$1" = "--no-rebuild" ]; then + rebuild=false + shift +fi + +xcd() { + echo + echo --- cd $1 + builtin cd "$GOROOT"/src/$1 +} + +if $rebuild; then + (xcd pkg + gomake clean + time gomake install + ) || exit $? +fi + +(xcd pkg +gomake testshort +) || exit $? + +(xcd pkg/sync; +GOMAXPROCS=10 gomake testshort +) || exit $? + +(xcd cmd/ebnflint +time gomake test +) || exit $? + +[ "$CGO_ENABLED" != 1 ] || +[ "$GOHOSTOS" == windows ] || +(xcd ../misc/cgo/stdio +gomake clean +./test.bash +) || exit $? + +[ "$CGO_ENABLED" != 1 ] || +(xcd ../misc/cgo/life +gomake clean +./test.bash +) || exit $? + +[ "$CGO_ENABLED" != 1 ] || +[ "$GOHOSTOS" == windows ] || +(xcd ../misc/cgo/test +gomake clean +gotest +) || exit $? + +(xcd ../doc/progs +time ./run +) || exit $? + +[ "$GOARCH" == arm ] || # uses network, fails under QEMU +(xcd ../doc/codelab/wiki +gomake clean +gomake +gomake test +) || exit $? + +for i in ../misc/dashboard/builder ../misc/goplay +do + (xcd $i + gomake clean + gomake + ) || exit $? +done + +[ "$GOARCH" == arm ] || +(xcd ../test/bench +./timing.sh -test +) || exit $? + +[ "$GOHOSTOS" == windows ] || +(xcd ../test +./run +) || exit $? + +echo +echo ALL TESTS PASSED |