2 # $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.15 1998/02/01 11:46:10 scrappy Exp $
4 if echo '\c' | grep -s c >/dev/null 2>&1
17 PGTZ="PST8PDT"; export PGTZ
18 PGDATESTYLE="Postgres,US"; export PGDATESTYLE
21 FRONTEND="psql -n -e -q"
25 echo "=============== Notes... ================="
26 echo "postmaster must already be running for the regression tests to succeed."
27 echo "The time zone is now set to PST8PDT explicitly by this regression test"
28 echo " client frontend. Please report any apparent problems to"
29 echo " ports@postgresql.org"
30 echo "See regress/README for more information."
33 echo "=============== destroying old regression database... ================="
36 echo "=============== creating new regression database... ================="
43 echo "=============== running regression queries... ================="
44 echo "" > regression.diffs
45 for i in `cat sql/tests`
47 $ECHO_N "${i} .. " $ECHO_C
48 $FRONTEND regression < sql/${i}.sql > results/${i}.out 2>&1
49 if [ -f expected/${i}-${SYSTEM}.out ]
51 EXPECTED="expected/${i}-${SYSTEM}.out"
53 EXPECTED="expected/${i}.out"
56 if [ `diff ${EXPECTED} results/${i}.out | wc -l` -ne 0 ]
58 ( diff -c ${EXPECTED} results/${i}.out; \
60 echo "----------------------"; \
61 echo "" ) >> regression.diffs
69 echo "=============== running error queries ... ================="
70 $FRONTEND regression < errors.sql
71 # this will generate error result code
73 #set this to 1 to avoid clearing the database
76 if test "$debug" -eq 1
78 echo Skipping clearing and deletion of the regression database
80 echo "=============== clearing regression database... ================="
81 $FRONTEND regression < destroy.sql
83 echo the destroy script has an error
88 echo "=============== destroying regression database... ================="