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
|
#!/bin/sh
set -eux
# when called as root, re-exec ourselves as nobody in a different directory
case $(id -u) in 0)
TMP=$(mktemp --directory --tmpdir check-postgres.XXXXXX)
trap "rm -rf $TMP" 0 2 3 15
cp -a * $TMP
chown -R nobody $TMP
cd $TMP
su -c $0 -s /bin/sh nobody
exit
;;
esac
trap "rm -rf test_database_check_postgres* /tmp/cptesting_socket*" 0 2 3 15
# remove test not compatible with PG12
rm -fv t/02_same_schema.t
# remove flaky test
rm -fv t/02_replicate_row.t
for v in $(/usr/share/postgresql-common/supported-versions); do
echo "### testing PostgreSQL $v ###"
rm -rf test_database_check_postgres* /tmp/cptesting_socket*
LC_ALL=C PERL_USE_UNSAFE_INC=1 PGBINDIR=/usr/lib/postgresql/$v/bin SKIP_NETWORK_TESTS=1 prove t
done
|