From: Tom Lane Date: Mon, 9 Oct 2006 01:45:49 +0000 (+0000) Subject: Fix back-branch pg_regress scripts to try the "canonical" expected file if we X-Git-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=066db54a4cfe8d046f70fc23ef63a24d9d9a1c54;p=users%2Fbernd%2Fpostgres.git Fix back-branch pg_regress scripts to try the "canonical" expected file if we 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. --- diff --git a/src/test/regress/pg_regress.sh b/src/test/regress/pg_regress.sh index 5cd83d0643..2d6b151b3a 100644 --- a/src/test/regress/pg_regress.sh +++ b/src/test/regress/pg_regress.sh @@ -680,7 +680,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 ] @@ -690,13 +691,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=$?