1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/bin/bash
set -eu
python3_versions="$(py3versions -s 2> /dev/null)"
cp -a "django_q/tests" "${AUTOPKGTEST_TMP}"
cp -a pytest.ini "${AUTOPKGTEST_TMP}"
cp -a pyproject.toml "${AUTOPKGTEST_TMP}"
cd "${AUTOPKGTEST_TMP}"
rc=0
for python3 in $python3_versions; do
service redis-server start
echo "Waiting for redis-server to start"
sleep 10
$python3 /usr/bin/poetry run pytest -x --cov=./django_q --cov-report=xml || rc=1
service redis-server stop
echo "Waiting for redis-server to stop"
sleep 10
done
exit $rc
|