]> granicus.if.org Git - postgresql/commitdiff
Fix back-branch pg_regress scripts to try the "canonical" expected file if we
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Oct 2006 01:45:57 +0000 (01:45 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 9 Oct 2006 01:45:57 +0000 (01:45 +0000)
tried a variant file from resultmap and it didn't match.  This is already done
in HEAD's C-code version, and is needed because OpenBSD has recently migrated
to a more standard handling of float underflow --- see buildfarm results
from emu.

src/test/regress/pg_regress.sh

index 368fd2d5278ce51936ca19645ad3a610036bc217..47f2cb91f383c5d5cdcc36a8f0e2fe887705d09e 100644 (file)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.36.2.1 2005/07/17 18:29:37 tgl Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/Attic/pg_regress.sh,v 1.36.2.2 2006/10/09 01:45:57 tgl Exp $
 
 me=`basename $0`
 : ${TMPDIR=/tmp}
@@ -629,7 +629,8 @@ do
         # to a system-specific expected file.
         # There shouldn't be multiple matches, but take the last if there are.
 
-        EXPECTED="$inputdir/expected/${name}"
+        STDEXPECTED="$inputdir/expected/${name}"
+        EXPECTED="$STDEXPECTED"
         for LINE in $SUBSTLIST
         do
             if [ `expr "$LINE" : "$name="` -ne 0 ]
@@ -639,13 +640,14 @@ do
             fi
         done
 
-        # If there are multiple equally valid result files, loop to get the right one.
+        # If there are multiple equally valid result files,
+        # loop to get the right one.
         # If none match, diff against the closest one.
 
         bestfile=
         bestdiff=
         result=2
-        for thisfile in $EXPECTED.out ${EXPECTED}_[0-9].out; do
+        for thisfile in $EXPECTED.out ${EXPECTED}_[0-9].out $STDEXPECTED.out; do
             [ ! -r "$thisfile" ] && continue
             diff $DIFFFLAGS $thisfile $outputdir/results/${name}.out >/dev/null 2>&1
             result=$?