#!/bin/sh
-# src/tools/pgtest
+# src/tools/pgtest [-n] [...]
# This runs a build/initdb/regression test suite
#
mkdir /tmp/$$
TMP="/tmp/$$"
-[ "X$1" != "X-n" ] && PGCLEAN=clean
+if [ "X$1" != "X-n" ]
+then PGCLEAN=clean
+else shift
+fi
# Run "make check" and store return code in $TMP/ret.
# Display output but also capture it in $TMP/0.
-($MAKE $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) | tee $TMP/0
+($MAKE "$@" $PGCLEAN check 2>&1; echo "$?" > $TMP/ret) | tee $TMP/0
# If success, display warnings
if [ $(cat $TMP/ret) -eq 0 ]