#!/bin/sh
# Run upstream's unit test suite against the installed package.
# Some tests read schemas from doc/schema, data from atest/testdata, and
# README.rst as an example of a file that exists but cannot be imported.

set -eu

cp -a utest doc atest README.rst "$AUTOPKGTEST_TMP"
cd "$AUTOPKGTEST_TMP"

for py in $(py3versions -s); do
    echo "--- Running unit tests for ${py} ---"
    "$py" utest/run.py
done
