#!/bin/sh
set -efu

pys="$(py3versions -sv 2>/dev/null)"

# These exclusions should be kept in sync with debian/rules
exclude_tests="not test_rusboost"
if dpkg-architecture -e armhf 2>/dev/null; then
	exclude_tests="$exclude_tests and not test_common"
fi

TMP="$(mktemp -d)"
trap "rm -r \"$TMP\"" EXIT
HOME="$TMP"
export HOME

for py in $pys; do
    python$py -m pytest -m 'not network' -s -k "$exclude_tests" 2>&1
done
