2009-11-14 16:29:09 -07:00
|
|
|
#!/usr/bin/env bash
|
2008-10-08 10:46:54 -06:00
|
|
|
# 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
|
2010-08-24 18:00:33 -06:00
|
|
|
if [ "$1" = "--no-env" ]; then
|
|
|
|
# caller has already run env.bash
|
|
|
|
shift
|
|
|
|
else
|
|
|
|
. ./env.bash
|
|
|
|
fi
|
2008-10-08 10:46:54 -06:00
|
|
|
|
2010-08-18 08:22:57 -06:00
|
|
|
unset MAKEFLAGS # single-threaded make
|
2010-03-31 20:48:33 -06:00
|
|
|
unset CDPATH # in case user has it set
|
2009-12-11 16:14:09 -07:00
|
|
|
|
2009-11-10 00:11:36 -07:00
|
|
|
# no core files, please
|
|
|
|
ulimit -c 0
|
|
|
|
|
2010-03-31 20:48:33 -06:00
|
|
|
# allow make.bash to avoid double-build of everything
|
|
|
|
rebuild=true
|
|
|
|
if [ "$1" = "--no-rebuild" ]; then
|
|
|
|
rebuild=false
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2008-10-08 10:46:54 -06:00
|
|
|
xcd() {
|
2008-10-24 21:14:28 -06:00
|
|
|
echo
|
2008-10-08 10:46:54 -06:00
|
|
|
echo --- cd $1
|
2009-12-11 16:14:09 -07:00
|
|
|
builtin cd "$GOROOT"/src/$1
|
2008-10-08 10:46:54 -06:00
|
|
|
}
|
|
|
|
|
2011-02-14 07:27:02 -07:00
|
|
|
if $rebuild; then
|
|
|
|
(xcd pkg
|
|
|
|
gomake clean
|
|
|
|
time gomake
|
|
|
|
gomake install
|
|
|
|
) || exit $i
|
|
|
|
fi
|
2008-11-20 11:54:11 -07:00
|
|
|
|
2011-02-14 07:27:02 -07:00
|
|
|
(xcd pkg
|
2011-03-25 15:50:44 -06:00
|
|
|
gomake testshort
|
2011-02-14 07:27:02 -07:00
|
|
|
) || exit $?
|
2008-10-23 18:13:34 -06:00
|
|
|
|
2009-06-09 10:53:44 -06:00
|
|
|
(xcd pkg/sync;
|
2010-03-31 20:48:33 -06:00
|
|
|
if $rebuild; then
|
2010-08-30 13:40:56 -06:00
|
|
|
gomake clean;
|
|
|
|
time gomake
|
2010-03-31 20:48:33 -06:00
|
|
|
fi
|
2011-03-25 15:50:44 -06:00
|
|
|
GOMAXPROCS=10 gomake testshort
|
2008-12-04 13:51:36 -07:00
|
|
|
) || exit $?
|
|
|
|
|
2010-09-21 23:30:42 -06:00
|
|
|
[ "$GOARCH" == arm ] ||
|
2009-06-16 13:03:32 -06:00
|
|
|
(xcd cmd/gofmt
|
2010-03-31 20:48:33 -06:00
|
|
|
if $rebuild; then
|
2010-08-30 13:40:56 -06:00
|
|
|
gomake clean;
|
|
|
|
time gomake
|
2010-03-31 20:48:33 -06:00
|
|
|
fi
|
2010-08-30 13:40:56 -06:00
|
|
|
time gomake smoketest
|
2009-03-03 17:09:40 -07:00
|
|
|
) || exit $?
|
2008-10-14 23:16:45 -06:00
|
|
|
|
2009-07-13 11:26:58 -06:00
|
|
|
(xcd cmd/ebnflint
|
2010-03-31 20:48:33 -06:00
|
|
|
if $rebuild; then
|
2010-08-30 13:40:56 -06:00
|
|
|
gomake clean;
|
|
|
|
time gomake
|
2010-03-31 20:48:33 -06:00
|
|
|
fi
|
2010-08-30 13:40:56 -06:00
|
|
|
time gomake test
|
2009-07-13 11:26:58 -06:00
|
|
|
) || exit $?
|
|
|
|
|
2010-09-21 23:30:42 -06:00
|
|
|
[ "$GOARCH" == arm ] ||
|
2011-02-08 18:37:08 -07:00
|
|
|
[ "$GOHOSTOS" == windows ] ||
|
2009-10-03 12:33:51 -06:00
|
|
|
(xcd ../misc/cgo/stdio
|
2011-02-08 18:37:08 -07:00
|
|
|
gomake clean
|
|
|
|
./test.bash
|
2009-10-03 12:33:51 -06:00
|
|
|
) || exit $?
|
|
|
|
|
2010-12-17 10:51:55 -07:00
|
|
|
[ "$GOARCH" == arm ] ||
|
2011-02-08 18:37:08 -07:00
|
|
|
[ "$GOHOSTOS" == windows ] ||
|
2010-12-17 10:51:55 -07:00
|
|
|
(xcd ../misc/cgo/life
|
2011-02-08 18:37:08 -07:00
|
|
|
gomake clean
|
|
|
|
./test.bash
|
2010-12-17 10:51:55 -07:00
|
|
|
) || exit $?
|
|
|
|
|
2011-03-11 13:09:32 -07:00
|
|
|
[ "$GOARCH" == arm ] ||
|
|
|
|
[ "$GOHOSTOS" == windows ] ||
|
|
|
|
(xcd ../misc/cgo/test
|
|
|
|
gomake clean
|
|
|
|
gotest
|
|
|
|
) || exit $?
|
|
|
|
|
2009-10-14 19:10:43 -06:00
|
|
|
(xcd pkg/exp/ogle
|
2010-08-30 13:40:56 -06:00
|
|
|
gomake clean
|
|
|
|
time gomake ogle
|
2009-09-25 12:36:27 -06:00
|
|
|
) || exit $?
|
|
|
|
|
2011-02-08 18:37:08 -07:00
|
|
|
[ "$GOHOSTOS" == windows ] ||
|
2009-01-06 16:49:27 -07:00
|
|
|
(xcd ../doc/progs
|
2011-02-08 18:37:08 -07:00
|
|
|
time ./run
|
2009-01-06 16:49:27 -07:00
|
|
|
) || exit $?
|
|
|
|
|
2011-01-25 21:56:52 -07:00
|
|
|
(xcd ../doc/codelab/wiki
|
2011-02-09 13:46:49 -07:00
|
|
|
gomake clean
|
|
|
|
gomake
|
2011-02-08 18:37:08 -07:00
|
|
|
gomake test
|
2011-01-30 21:58:44 -07:00
|
|
|
) || exit $?
|
2011-01-25 21:56:52 -07:00
|
|
|
|
2010-10-20 17:46:10 -06:00
|
|
|
for i in ../misc/dashboard/builder ../misc/goplay
|
|
|
|
do
|
|
|
|
(xcd $i
|
|
|
|
gomake clean
|
|
|
|
gomake
|
|
|
|
) || exit $?
|
|
|
|
done
|
|
|
|
|
2010-09-21 23:30:42 -06:00
|
|
|
[ "$GOARCH" == arm ] ||
|
2011-02-08 18:37:08 -07:00
|
|
|
[ "$GOHOSTOS" == windows ] ||
|
2009-08-09 15:31:05 -06:00
|
|
|
(xcd ../test/bench
|
2011-02-08 18:37:08 -07:00
|
|
|
./timing.sh -test
|
2009-08-09 15:31:05 -06:00
|
|
|
) || exit $?
|
|
|
|
|
2011-02-08 18:37:08 -07:00
|
|
|
[ "$GOHOSTOS" == windows ] ||
|
2008-10-08 10:46:54 -06:00
|
|
|
(xcd ../test
|
2011-02-08 18:37:08 -07:00
|
|
|
./run
|
2008-10-29 16:23:29 -06:00
|
|
|
) || exit $?
|
2008-10-08 10:46:54 -06:00
|
|
|
|
2011-02-14 07:27:02 -07:00
|
|
|
echo
|
|
|
|
echo ALL TESTS PASSED
|