#! /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:"
    # Temporarily skip failing test: see #1063962 and
    # https://github.com/pytest-dev/pytest-order/issues/110
    $py -m pytest --deselect=tests/test_xdist_handling.py::test_xdist_ordering $tests
done
