1
1
#! /bin/sh
2
2
#
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 $
4
4
5
5
# ----------
6
6
# 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-
96
96
trap ' echo ""
97
97
echo ""
98
98
echo "user abort ..."
99
- if [ ! -z $PMPID ]
99
+ if [ ! -z " $PMPID" ]
100
100
then
101
101
echo "Signalling postmaster with PID $PMPID to shutdown immediately"
102
102
kill -2 $PMPID
@@ -110,7 +110,7 @@ trap ' echo ""
110
110
# ----------
111
111
# Prepare a clean check directory
112
112
# ----------
113
- if [ -e $CHKDIR ]
113
+ if [ -d $CHKDIR ]
114
114
then
115
115
echo " =============== Removing old ./tmp_check directory ... ================"
116
116
rm -rf $CHKDIR
@@ -126,17 +126,14 @@ mkdir -p $LOGDIR
126
126
# Install this build into ./tmp/check
127
127
# ----------
128
128
echo " =============== Installing new build into ./tmp_check ================"
129
- (
130
- cd ../..
131
- make POSTGRESDIR=$CHKDIR install > $LOGDIR /install.log 2>&1
132
- exit $?
133
- )
129
+ ${MAKE:- gmake} -C ../.. POSTGRESDIR=$CHKDIR install > $LOGDIR /install.log 2>&1
130
+
134
131
if [ $? -ne 0 ]
135
132
then
136
133
echo " "
137
134
echo " ERROR: Check installation failed - cannot continue"
138
135
echo " Please examine $LOGDIR /install.log"
139
- echo " for the errors occured ."
136
+ echo " for the reason ."
140
137
echo " "
141
138
exit 2
142
139
fi
@@ -168,9 +165,9 @@ initdb --pglib=$LIBDIR --pgdata=$PGDATA >$LOGDIR/initdb.log 2>&1
168
165
if [ $? -ne 0 ]
169
166
then
170
167
echo " "
171
- echo " ERROR: Check installation failed - cannot continue"
168
+ echo " ERROR: Check initdb failed - cannot continue"
172
169
echo " Please examine $LOGDIR /initdb.log"
173
- echo " for the errors occured ."
170
+ echo " for the reason ."
174
171
echo " "
175
172
exit 3
176
173
fi
@@ -185,16 +182,17 @@ postmaster -D $PGDATA -p $PGPORT -o -F >$LOGDIR/postmaster.log 2>&1 &
185
182
PMPID=$!
186
183
sleep 2
187
184
188
- if ! kill -0 $PMPID > /dev/null 2>&1
185
+ if kill -0 $PMPID > /dev/null 2>&1
189
186
then
187
+ echo " Regression postmaster is running - PID=$PMPID PGPORT=$PGPORT "
188
+ else
190
189
echo " "
191
190
echo " ERROR: Regression postmaster did not startup."
192
- echo " Please examing $LOGDIR /postmaster.log"
193
- echo " for the errors occured ."
191
+ echo " Please examine $LOGDIR /postmaster.log"
192
+ echo " for the reason ."
194
193
echo " "
195
194
exit 4
196
195
fi
197
- echo " Regression postmaster is running - PID=$PMPID PGPORT=$PGPORT "
198
196
199
197
200
198
# ----------
@@ -332,23 +330,21 @@ lno=0
332
330
fi
333
331
334
332
# ----------
335
- # Tell what we're doing and start them all inside a
336
- # subshell in background. The bourne shell's wait is
333
+ # Tell what we're doing and start them all in background.
334
+ # The bourne shell's wait is
337
335
# too dumb to do it smarter. I'd really like to see
338
336
# the ok|failed message as soon as the individual tests
339
337
# finish. That'd make it easier to start longer running
340
338
# ones first to increase concurrency.
341
339
# ----------
342
- gnam=` echo " $pargroup ($parntests tests)" | awk ' {printf "%-26.26s", $line ;}' `
340
+ gnam=` echo " $pargroup ($parntests tests)" | awk ' {printf "%-26.26s", $0 ;}' `
343
341
$ECHO_N " parallel $gnam ... " $ECHO_C
344
342
345
- (
346
- for name in $parlist ; do
347
- $FRONTEND regression < sql/${name} .sql \
348
- > results/${name} .out 2>&1
349
- done
350
- wait
351
- )
343
+ for name in $parlist ; do
344
+ $FRONTEND regression < sql/${name} .sql \
345
+ > results/${name} .out 2>&1 &
346
+ done
347
+ wait
352
348
353
349
# ----------
354
350
# Setup status information for the diff check below
0 commit comments