Skip to content

Commit b9110b9

Browse files
committed
Allow resultmap file to be missing, for use in contrib self-tests.
1 parent 01b5efa commit b9110b9

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

src/test/regress/pg_regress.sh

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#! /bin/sh
2-
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.13 2000/11/22 01:47:47 petere Exp $
2+
# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.14 2000/12/11 19:00:33 tgl Exp $
33

44
me=`basename $0`
55
: ${TMPDIR=/tmp}
@@ -243,18 +243,21 @@ trap '
243243
# ----------
244244

245245
cat /dev/null >$TMPFILE
246-
while read LINE
247-
do
248-
HOSTPAT=`expr "$LINE" : '.*/\(.*\)='`
249-
if [ `expr "$host_platform:$compiler" : "$HOSTPAT"` -ne 0 ]
250-
then
251-
# remove hostnamepattern from line so that there are no shell
252-
# wildcards in SUBSTLIST; else later 'for' could expand them!
253-
TESTNAME=`expr "$LINE" : '\(.*\)/'`
254-
SUBST=`echo "$LINE" | sed 's/^.*=//'`
255-
echo "$TESTNAME=$SUBST" >> $TMPFILE
256-
fi
257-
done <"$inputdir/resultmap"
246+
if [ -f "$inputdir/resultmap" ]
247+
then
248+
while read LINE
249+
do
250+
HOSTPAT=`expr "$LINE" : '.*/\(.*\)='`
251+
if [ `expr "$host_platform:$compiler" : "$HOSTPAT"` -ne 0 ]
252+
then
253+
# remove hostnamepattern from line so that there are no shell
254+
# wildcards in SUBSTLIST; else later 'for' could expand them!
255+
TESTNAME=`expr "$LINE" : '\(.*\)/'`
256+
SUBST=`echo "$LINE" | sed 's/^.*=//'`
257+
echo "$TESTNAME=$SUBST" >> $TMPFILE
258+
fi
259+
done <"$inputdir/resultmap"
260+
fi
258261
SUBSTLIST=`cat $TMPFILE`
259262
rm -f $TMPFILE
260263

0 commit comments

Comments
 (0)