blob: 2c5d13dadd7a6733d01f9047dfb348ade642714d [file] [log] [blame]
Russ Coxbbb00c62008-10-08 09:46:54 -07001#!/bin/bash
2# Copyright 2009 The Go Authors. All rights reserved.
3# Use of this source code is governed by a BSD-style
4# license that can be found in the LICENSE file.
5
6set -e
7
8xcd() {
Ken Thompsonb379d542008-10-24 20:14:28 -07009 echo
Russ Coxbbb00c62008-10-08 09:46:54 -070010 echo --- cd $1
Ken Thompsonb379d542008-10-24 20:14:28 -070011 builtin cd $1
Russ Coxbbb00c62008-10-08 09:46:54 -070012}
13
Russ Cox5014da72008-11-20 10:54:11 -080014maketest() {
15 for i
16 do
17 (
18 xcd $i
19 make clean
20 time make
21 make test
22 ) || exit $?
23 done
24}
Russ Cox079c00a2008-11-17 12:34:03 -080025
Russ Cox5014da72008-11-20 10:54:11 -080026maketest \
Ian Lance Taylor1a19cb82008-12-04 13:14:09 -080027 lib/fmt\
28 lib/hash\
Russ Cox08ca30b2008-12-19 03:05:37 -080029 lib/json\
Russ Cox5014da72008-11-20 10:54:11 -080030 lib/math\
Russ Cox08ca30b2008-12-19 03:05:37 -080031 lib/net\
Russ Cox5014da72008-11-20 10:54:11 -080032 lib/reflect\
33 lib/regexp\
34 lib/strconv\
Ian Lance Taylor1a19cb82008-12-04 13:14:09 -080035 lib/tabwriter\
36 lib/time\
Rob Pike536b1f22008-10-23 17:13:34 -070037
Russ Cox5014da72008-11-20 10:54:11 -080038# all of these are subtly different
39# from what maketest does.
40
Russ Cox5169bb42008-11-21 16:13:31 -080041(xcd lib; make test) || exit $?
42
Russ Coxbf3dd3f2008-12-04 12:51:36 -080043(xcd lib/sync;
44make clean;
45time make
46GOMAXPROCS=10 make test
47) || exit $?
48
Russ Cox5014da72008-11-20 10:54:11 -080049(xcd ../usr/gri/pretty
Rob Pike84523402008-10-14 22:16:45 -070050make clean
51time make
Russ Cox5014da72008-11-20 10:54:11 -080052make smoketest
Russ Cox527669e2008-10-29 15:23:29 -070053) || exit $?
Rob Pike84523402008-10-14 22:16:45 -070054
Robert Griesemeraf065a02009-01-06 16:26:45 -080055(xcd ../usr/gri/gosrc
56make clean
57time make
58# make test
59) || exit $?
Russ Coxbbb00c62008-10-08 09:46:54 -070060
Rob Pike8d210042009-01-06 15:49:27 -080061(xcd ../doc/progs
Ken Thompsonb0f627a2009-01-06 17:31:24 -080062time ./run
Rob Pike8d210042009-01-06 15:49:27 -080063) || exit $?
64
Russ Coxbbb00c62008-10-08 09:46:54 -070065(xcd ../test
66./run
Russ Cox527669e2008-10-29 15:23:29 -070067) || exit $?
Russ Coxbbb00c62008-10-08 09:46:54 -070068