#!/bin/sh

set -e

cp -r graphiql_debug_toolbar tests ${AUTOPKGTEST_TMP}
cd ${AUTOPKGTEST_TMP}

for py3vers in $(py3versions -s); do
    echo
    echo "***************************"
    echo "*** Testing with ${py3vers}"
    echo "***************************"
    echo
    cd ${AUTOPKGTEST_TMP} && \
        echo "Content of current working folder:\n" && \
        ls -la && \
        echo "Running tests...\n" && \
        PYTHONPATH=. DJANGO_SETTINGS_MODULE=tests.settings ${py3vers} -m django test -v2 tests
done
