#!/bin/sh
-# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.13 1997/12/16 16:01:05 thomas Exp $
+# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.20 1998/07/26 04:31:41 scrappy Exp $
#
if echo '\c' | grep -s c >/dev/null 2>&1
then
#FRONTEND=monitor
FRONTEND="psql -n -e -q"
+SYSTEM=`uname -s`
+
echo "=============== Notes... ================="
echo "postmaster must already be running for the regression tests to succeed."
echo "The time zone is now set to PST8PDT explicitly by this regression test"
fi
echo "=============== running regression queries... ================="
-for i in `cat sql/tests`
+echo "" > regression.diffs
+if [ -n "$MULTIBYTE" ];then
+ mbtests=`echo $MULTIBYTE|tr "[A-Z]" "[a-z]"`
+else
+ mbtests=""
+fi
+for i in `cat sql/tests` $mbtests
do
$ECHO_N "${i} .. " $ECHO_C
$FRONTEND regression < sql/${i}.sql > results/${i}.out 2>&1
- if [ `diff expected/${i}.out results/${i}.out | wc -l` -ne 0 ]
+ if [ -f expected/${i}-${SYSTEM}.out ]
+ then
+ EXPECTED="expected/${i}-${SYSTEM}.out"
+ else
+ EXPECTED="expected/${i}.out"
+ fi
+
+ if [ `diff ${EXPECTED} results/${i}.out | wc -l` -ne 0 ]
then
+ ( diff -wC3 ${EXPECTED} results/${i}.out; \
+ echo ""; \
+ echo "----------------------"; \
+ echo "" ) >> regression.diffs
echo failed
else
echo ok