3 # src/tools/pgtest [-n] [...]
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
26 # Run "make check" and store return code in $TMP/ret.
27 # Display output but also capture it in $TMP/0.
28 ($MAKE "$@" $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) | tee $TMP/0
30 # If success, display warnings
31 if [ $(cat $TMP/ret) -eq 0 ]
33 # The following grep's have to be adjusted for your setup because
34 # certain warnings are acceptable.
36 grep -v setproctitle |
38 grep -v yy_flex_realloc
41 # return original make error code