]> granicus.if.org Git - postgresql/blob - src/tools/pgtest
Autoconfiscate selection of 64-bit int type for 64-bit large object API.
[postgresql] / src / tools / pgtest
1 #!/bin/sh
2
3 # src/tools/pgtest
4
5 # This runs a build/initdb/regression test suite
6 #
7 # This will start a temporary postmaster, so you have to
8 # have enough kernel resources to run two postmasters or
9 # stop your main postmaster before running this script.
10 #
11 # Use -n to prevent 'make clean'
12
13 MAKE="make"
14
15 [ ! -d src ] && echo "This must be run from the top of the PostgreSQL source tree" 1>&2 && exit 1
16
17 trap "rm -rf /tmp/$$" 0 1 2 3 15
18 mkdir /tmp/$$
19 TMP="/tmp/$$"
20
21 [ "X$1" != "X-n" ] && PGCLEAN=clean
22
23 # Run "make check" and store return code in $TMP/ret.
24 # Display output but also capture it in $TMP/0.
25 ($MAKE $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) | tee  $TMP/0
26
27 # If success, display warnings
28 if [ $(cat $TMP/ret) -eq 0 ]
29 then    cat $TMP/0 |
30         # The following grep's have to be adjusted for your setup because
31         # certain warnings are acceptable.
32         grep -i warning |
33         grep -v setproctitle |
34         grep -v find_rule |
35         grep -v yy_flex_realloc
36 fi
37
38 # return original make error code
39 exit `cat $TMP/ret`