1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
|
#!/bin/sh
set -e
# ensure temporary directory exists
if [ -z "$AUTOPKGTEST_TMP" ] ; then
AUTOPKGTEST_TMP=$( mktemp -d )
fi
# setup test environment
cp -r tests.py "$AUTOPKGTEST_TMP/"
cp -r conftest.py "$AUTOPKGTEST_TMP/"
cd "$AUTOPKGTEST_TMP"
# upstream provides unit tests, but some have the local source hardcoded,
# while we want to test the installed package
sed -e "s_anonip.py_/usr/bin/anonip_" -i tests.py
for py in $(py3versions -s); do
$py -Wd -m pytest -r a -vv tests.py 2>&1;
done
|