5 # This runs a build/initdb/regression test suite
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.
11 # Use -n to prevent 'make clean'
15 [ ! -d src ] && echo "This must be run from the top of the PostgreSQL source tree" 1>&2 && exit 1
17 trap "rm -rf /tmp/$$" 0 1 2 3 15
21 [ "X$1" != "X-n" ] && PGCLEAN=clean
23 # run make check, capture return code in $TMP/ret, then display
24 # that but capture it in $TMP/0 too, and return original make
25 # error code. If that succeded, display captured warnings
27 ($MAKE $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) |
28 (tee $TMP/0; exit `cat $TMP/ret`) &&
30 # The following grep's have to be adjusted for your setup because
31 # certain warnings are acceptable.
33 grep -v setproctitle |
35 grep -v yy_flex_realloc
37 # return original make error code