summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2000-12-11 19:00:33 +0000
committerTom Lane <tgl@sss.pgh.pa.us>2000-12-11 19:00:33 +0000
commitb9110b97d99a604830fcc0373407c853ebdef228 (patch)
tree8492a7485c43307ce2b61f57389e09ae8de4dcad /src
parent01b5efa5e3a3c989bffc3432a2cba75052656005 (diff)
Allow resultmap file to be missing, for use in contrib self-tests.
Diffstat (limited to 'src')
-rw-r--r--src/test/regress/pg_regress.sh29
1 files changed, 16 insertions, 13 deletions
diff --git a/src/test/regress/pg_regress.sh b/src/test/regress/pg_regress.sh
index 7e458cd0e9b..0b13f699563 100644
--- a/src/test/regress/pg_regress.sh
+++ b/src/test/regress/pg_regress.sh
@@ -1,5 +1,5 @@
#! /bin/sh
-# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.13 2000/11/22 01:47:47 petere Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.14 2000/12/11 19:00:33 tgl Exp $
me=`basename $0`
: ${TMPDIR=/tmp}
@@ -243,18 +243,21 @@ trap '
# ----------
cat /dev/null >$TMPFILE
-while read LINE
-do
- HOSTPAT=`expr "$LINE" : '.*/\(.*\)='`
- if [ `expr "$host_platform:$compiler" : "$HOSTPAT"` -ne 0 ]
- then
- # remove hostnamepattern from line so that there are no shell
- # wildcards in SUBSTLIST; else later 'for' could expand them!
- TESTNAME=`expr "$LINE" : '\(.*\)/'`
- SUBST=`echo "$LINE" | sed 's/^.*=//'`
- echo "$TESTNAME=$SUBST" >> $TMPFILE
- fi
-done <"$inputdir/resultmap"
+if [ -f "$inputdir/resultmap" ]
+then
+ while read LINE
+ do
+ HOSTPAT=`expr "$LINE" : '.*/\(.*\)='`
+ if [ `expr "$host_platform:$compiler" : "$HOSTPAT"` -ne 0 ]
+ then
+ # remove hostnamepattern from line so that there are no shell
+ # wildcards in SUBSTLIST; else later 'for' could expand them!
+ TESTNAME=`expr "$LINE" : '\(.*\)/'`
+ SUBST=`echo "$LINE" | sed 's/^.*=//'`
+ echo "$TESTNAME=$SUBST" >> $TMPFILE
+ fi
+ done <"$inputdir/resultmap"
+fi
SUBSTLIST=`cat $TMPFILE`
rm -f $TMPFILE