Commit bf14fb8f authored by Peter Eisentraut's avatar Peter Eisentraut

Remove old regression test drivers.

parent e5ba2fc5
#!/bin/sh
# check regression tests
# usage: checkresults [ regress.out ]
[ "$#" -eq 0 ] && set regress.out
for file in `cat "$@" | grep 'failed$' | grep -v '^dropdb: ' | cut -d " " -f 1`
do
echo "====== $file ======"
diff -w expected/$file.out results
done
#!/bin/sh
# $Header: /cvsroot/pgsql/src/test/regress/Attic/regress.sh,v 1.56 2000/11/11 19:56:20 thomas Exp $
#
if [ $# -eq 0 ]; then
echo "Syntax: $0 <hostname> [extra-tests]"
exit 1
fi
hostname=$1
shift
extratests="$*"
case $hostname in
i*86-pc-cygwin* | i386-*-qnx* | *beos*)
HOSTLOC="-h localhost"
;;
*)
HOSTLOC=""
;;
esac
if echo '\c' | grep -s c >/dev/null 2>&1
then
ECHO_N="echo -n"
ECHO_C=""
else
ECHO_N="echo"
ECHO_C='\c'
fi
PGTZ="PST8PDT"; export PGTZ
PGDATESTYLE="Postgres,US"; export PGDATESTYLE
unset LC_COLLATE LC_CTYPE LC_MONETARY LC_MESSAGES LC_NUMERIC LC_TIME LC_ALL LANG LANGUAGE
FRONTEND="psql $HOSTLOC -a -q -X"
# ----------
# Scan resultmap file to find which platform-specific expected files to use.
# The format of each line of the file is
# testname/hostnamepattern=substitutefile
# where the hostnamepattern is evaluated per the rules of expr(1) --- namely,
# it is a standard regular expression with an implicit ^ at the start.
#
# The tempfile hackery is needed because some shells will run the loop
# inside a subshell, whereupon shell variables set therein aren't seen
# outside the loop :-(
# ----------
TMPFILE="matches.$$"
cat /dev/null > $TMPFILE
while read LINE
do
HOSTPAT=`expr "$LINE" : '.*/\(.*\)='`
if [ `expr "$hostname" : "$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 <resultmap
SUBSTLIST=`cat $TMPFILE`
rm -f $TMPFILE
if [ -d ./obj ]; then
cd ./obj
fi
[ -d results ] || mkdir results
echo "=============== Notes... ================="
echo "postmaster must already be running for the regression tests to succeed."
echo "The time zone is set to PST8PDT for these tests by the client frontend."
echo "Please report any apparent problems to ports@postgresql.org"
echo "See regress/README for more information."
echo ""
echo "=============== dropping old regression database... ================="
dropdb $HOSTLOC regression
echo "=============== creating new regression database... ================="
if [ -n "$MULTIBYTE" ];then
mbtests=`echo $MULTIBYTE | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
PGCLIENTENCODING="$MULTIBYTE"
export PGCLIENTENCODING
ENCODINGOPT="-E $MULTIBYTE"
else
mbtests=""
unset PGCLIENTENCODING
ENCODINGOPT=""
fi
createdb $ENCODINGOPT $HOSTLOC regression
if [ $? -ne 0 ]; then
echo createdb failed
exit 1
fi
if [ "x$hostname" != "xi386-pc-qnx" ]; then
echo "=============== installing languages... ================="
$ECHO_N "installing PL/pgSQL .. " $ECHO_C
createlang $HOSTLOC plpgsql regression
if [ $? -ne 0 -a $? -ne 2 ]; then
echo failed
exit 1
else
echo ok
fi
fi
echo "=============== running regression queries... ================="
cat /dev/null > regression.diffs
if [ "x$hostname" = "xi386-pc-qnx" ]; then
DIFFOPT="-b"
else
DIFFOPT="-w"
fi
stdtests=`awk '
$1=="test" { print $2; }
{}
' < sql/run_check.tests`
for tst in $stdtests $mbtests $extratests
do
$ECHO_N "${tst} .. " $ECHO_C
$FRONTEND regression < sql/${tst}.sql > results/${tst}.out 2>&1
#
# Check list extracted from resultmap to see if we should compare
# to a system-specific expected file.
# There shouldn't be multiple matches, but take the last if there are.
#
EXPECTED="expected/${tst}.out"
for LINE in $SUBSTLIST
do
if [ `expr "$LINE" : "$tst="` -ne 0 ]
then
SUBST=`echo "$LINE" | sed 's/^.*=//'`
EXPECTED="expected/${SUBST}.out"
fi
done
if [ `diff ${DIFFOPT} ${EXPECTED} results/${tst}.out | wc -l` -ne 0 ]; then
( diff ${DIFFOPT} -C3 ${EXPECTED} results/${tst}.out; \
echo ""; \
echo "----------------------"; \
echo "" ) >> regression.diffs
echo failed
else
echo ok
fi
done
exit 0
echo "=============== running error queries ... ================="
$FRONTEND regression < errors.sql
# this will generate error result code
#set this to 1 to avoid clearing the database
debug=0
if [ test "$debug" -eq 1 ]; then
echo Skipping clearing and deletion of the regression database
else
echo "=============== clearing regression database... ================="
$FRONTEND regression < drop.sql
if [ $? -ne 0 ]; then
echo the drop script has an error
exit 1
fi
exit 0
echo "=============== dropping regression database... ================="
dropdb regression
if [ $? -ne 0 ]; then
echo dropdb failed
exit 1
fi
exit 0
fi
This diff is collapsed.
# ----------
# The first group of parallel test
# ----------
parallel group1
test boolean
test char
test name
test varchar
test text
test int2
test int4
test int8
test oid
test float4
test float8
test numeric
endparallel
test strings # Depends on things setup during char, varchar and text
test numerology # Depends on int2, int4, int8, float4, float8
# ----------
# The second group of parallel test
# ----------
parallel group2
test point
test lseg
test box
test path
test polygon
test circle
test date
test time
test timestamp
test interval
test abstime
test reltime
test tinterval
test inet
test comments
test oidjoins
test type_sanity
test opr_sanity
endparallel
test geometry # Depends on point, lseg, box, path, polygon and circle
test horology # Depends on interval, timestamp, reltime and abstime
# ----------
# These four each depend on the previous one
# ----------
test create_function_1
test create_type
test create_table
test create_function_2
# ----------
# Load huge amounts of data
# We should split the data files into single files and then
# execute two copy tests parallel, to check that copy itself
# is concurrent safe.
# ----------
test copy
# ----------
# The third group of parallel test
# ----------
parallel group3
test constraints
test triggers
test create_misc
test create_aggregate
test create_operator
test create_index
test inherit
endparallel
test create_view # Depends on the above
# ----------
# sanity_check does a vacuum, affecting the sort order of SELECT *
# results. So it should not run parallel to other tests.
# ----------
test sanity_check
# ----------
# Believe it or not, select creates a table, subsequent
# tests need.
# ----------
test errors
test select
# ----------
# The fourth group of parallel test
# ----------
parallel group4
test select_into
test select_distinct
test select_distinct_on
test select_implicit
test select_having
test subselect
test union
test case
test join
test aggregates
test transactions
test random
test portals
test arrays
test btree_index
test hash_index
endparallel
test misc
# ----------
# The fifth group of parallel test
# ----------
parallel group5
test select_views
test alter_table
test portals_p2
test rules
test foreign_key
endparallel
# ----------
# The sixth group of parallel test
# ----------
parallel group6
test limit
test plpgsql # Cannot run concurrently to rules
test temp
endparallel
boolean
char
name
varchar
text
strings
int2
int4
int8
oid
float4
float8
numerology
point
lseg
box
path
polygon
circle
geometry
date
time
timestamp
interval
abstime
reltime
tinterval
horology
inet
comments
oidjoins
type_sanity
opr_sanity
create_function_1
create_type
create_table
create_function_2
constraints
triggers
copy
create_misc
create_aggregate
create_operator
create_view
create_index
sanity_check
errors
select
select_into
select_distinct
select_distinct_on
select_implicit
select_having
subselect
union
case
join
aggregates
transactions
random
portals
misc
arrays
btree_index
hash_index
select_views
alter_table
portals_p2
rules
limit
plpgsql
temp
numeric
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment