#! /bin/sh

set -e

python3_versions="$(py3versions -s)"

# ppc64el is quite slow and bombs on some of the performance tests
arch=$(dpkg --print-architecture)
if [ $arch = ppc64el ]; then
    tests="tests"
else
    tests="tests perf_tests"
fi

cp -a perf_tests tests "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

for py in $python3_versions; do
    echo "Testing with $py:"
    $py -m pytest $tests
done
