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