1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/bin/sh
# some tests insist on /var/run/postgresql/, so run as root
set -e
cleanup () {
for f in test/sql/*.sql.orig; do
test -f $f || continue
mv $f ${f%.orig}
done
}
trap "cleanup" EXIT HUP INT QUIT PIPE TERM
for v in $(pg_buildext supported-versions); do
case $v in
8*|9.0) make sql/plproxy.sql
;;
*) # we want to test the installed extension, so don't source from the build tree
sed -i.orig 's/\\i.*plproxy\.sql/CREATE EXTENSION plproxy;/' test/sql/*.sql
;;
esac
if ! newnet pg_virtualenv -c '-p 5432 --locale C' -i '--auth trust' -v $v \
make -f $PWD/Makefile \
installcheck PG_CONFIG=/usr/lib/postgresql/$v/bin/pg_config; then
head -n 500 regression.diffs
exit 1
fi
cleanup
done
|