#!/bin/sh

set -efu

# copy tests to a directory where the "pg" sibling directory doesn't get in the way ("import pg" fails weirdly otherwise)
cp -a tests ${AUTOPKGTEST_TMP:=/tmp}
cd $AUTOPKGTEST_TMP

for py in $(py3versions -s); do
    for pg in $(/usr/share/postgresql-common/supported-versions); do
	echo "### PostgreSQL $pg, $py ###"
	pg_virtualenv -v $pg $py -m unittest discover -v
	echo "### End $pg, $py ###"
    done
done
