11#! /bin/sh
22#
3- # $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.1 1999/11/19 18:51:49 wieck Exp $
3+ # $Header: /cvsroot/pgsql/src/test/regress/Attic/run_check.sh,v 1.2 1999/11/20 20:21:30 tgl Exp $
44
55# ----------
66# This is currently needed because the actual 7.0 psql makes
@@ -96,7 +96,7 @@ SYSTEM=`/bin/sh ../../config.guess | awk -F\- '{ split($3,a,/[0-9]/); printf"%s-
9696trap ' echo ""
9797echo ""
9898echo "user abort ..."
99- if [ ! -z $PMPID ]
99+ if [ ! -z" $PMPID" ]
100100then
101101echo "Signalling postmaster with PID $PMPID to shutdown immediately"
102102kill -2 $PMPID
@@ -110,7 +110,7 @@ trap 'echo ""
110110# ----------
111111# Prepare a clean check directory
112112# ----------
113- if [-e $CHKDIR ]
113+ if [-d $CHKDIR ]
114114then
115115echo " =============== Removing old ./tmp_check directory ... ================"
116116rm -rf$CHKDIR
@@ -126,17 +126,14 @@ mkdir -p $LOGDIR
126126# Install this build into ./tmp/check
127127# ----------
128128echo " =============== Installing new build into ./tmp_check ================"
129- (
130- cd ../..
131- make POSTGRESDIR=$CHKDIR install> $LOGDIR /install.log2>&1
132- exit $?
133- )
129+ ${MAKE:- gmake} -C ../.. POSTGRESDIR=$CHKDIR install> $LOGDIR /install.log2>&1
130+
134131if [$? -ne 0 ]
135132then
136133echo " "
137134echo " ERROR: Check installation failed - cannot continue"
138135echo " Please examine$LOGDIR /install.log"
139- echo " for theerrors occured ."
136+ echo " for thereason ."
140137echo " "
141138exit 2
142139fi
@@ -168,9 +165,9 @@ initdb --pglib=$LIBDIR --pgdata=$PGDATA >$LOGDIR/initdb.log 2>&1
168165if [$? -ne 0 ]
169166then
170167echo " "
171- echo " ERROR: Checkinstallation failed - cannot continue"
168+ echo " ERROR: Checkinitdb failed - cannot continue"
172169echo " Please examine$LOGDIR /initdb.log"
173- echo " for theerrors occured ."
170+ echo " for thereason ."
174171echo " "
175172exit 3
176173fi
@@ -185,16 +182,17 @@ postmaster -D $PGDATA -p $PGPORT -o -F >$LOGDIR/postmaster.log 2>&1 &
185182PMPID=$!
186183sleep 2
187184
188- if ! kill -0$PMPID > /dev/null2>&1
185+ if kill -0$PMPID > /dev/null2>&1
189186then
187+ echo " Regression postmaster is running - PID=$PMPID PGPORT=$PGPORT "
188+ else
190189echo " "
191190echo " ERROR: Regression postmaster did not startup."
192- echo " Pleaseexaming $LOGDIR /postmaster.log"
193- echo " for theerrors occured ."
191+ echo " Pleaseexamine $LOGDIR /postmaster.log"
192+ echo " for thereason ."
194193echo " "
195194exit 4
196195fi
197- echo " Regression postmaster is running - PID=$PMPID PGPORT=$PGPORT "
198196
199197
200198# ----------
@@ -332,23 +330,21 @@ lno=0
332330fi
333331
334332# ----------
335- # Tell what we're doing and start them allinside a
336- # subshell in background. The bourne shell's wait is
333+ # Tell what we're doing and start them allin background.
334+ # The bourne shell's wait is
337335# too dumb to do it smarter. I'd really like to see
338336# the ok|failed message as soon as the individual tests
339337# finish. That'd make it easier to start longer running
340338# ones first to increase concurrency.
341339# ----------
342- gnam=` echo" $pargroup ($parntests tests)" | awk' {printf "%-26.26s", $line ;}' `
340+ gnam=` echo" $pargroup ($parntests tests)" | awk' {printf "%-26.26s", $0 ;}' `
343341$ECHO_N " parallel$gnam ..." $ECHO_C
344342
345- (
346- for name in $parlist ; do
347- $FRONTEND regression< sql/${name} .sql\
348- > results/${name} .out2>&1
349- done
350- wait
351- )
343+ for name in $parlist ; do
344+ $FRONTEND regression< sql/${name} .sql\
345+ > results/${name} .out2>&1 &
346+ done
347+ wait
352348
353349# ----------
354350# Setup status information for the diff check below