#!/bin/sh
# Run python3-pyswarms tests using the default Python 3 version. Assumes
# $AUTOPKGTEST_TMP is set, see /usr/share/doc/autopkgtest/README.package-tests.rst.gz
set -efu

SOURCE_BASE="$PWD"
for interpreter in `py3versions --supported 2>/dev/null`
do
	echo "=== Testing with $interpreter ==="
	# We just copy the entire test suite to the $AUTOPKGTEST_TMP directory and
	# run the tests from within there.
	cd "$SOURCE_BASE"
	mkdir "$AUTOPKGTEST_TMP"/$interpreter
	cp -r tests "$AUTOPKGTEST_TMP"/$interpreter/
	cd "$AUTOPKGTEST_TMP"/$interpreter
	$interpreter -m pytest
done
