#! /bin/sh

set -e

python3_versions="$(py3versions -s)"

# ppc64el and riscv64 are quite slow and bomb on some of the performance tests
arch=$(dpkg --print-architecture)
case $arch in
    ppc64el|riscv64) tests="tests" ;;
    *) tests="tests perf_tests" ;;
esac

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
