| 1 | #!/bin/bash |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | python3_versions="$(py3versions -s)" |
| 6 | |
| 7 | cp -a tests "$AUTOPKGTEST_TMP" |
| 8 | cd "$AUTOPKGTEST_TMP" |
| 9 | |
| 10 | # Despite the documentation saying that HOME will be set sensibly, |
| 11 | # this does not appear to be the case for some versions of autopkgtest, |
| 12 | # so we set it explicitly. |
| 13 | # Some of these tests do not work on overlay filesystems, which are |
| 14 | # typically used by sbuild; see my failed attempts at addressing this at |
| 15 | # https://github.com/arsenetar/send2trash/issues/67 |
| 16 | # So we just skip all of the tests in such an environment. |
| 17 | if mount | grep -q "on / type overlay" |
| 18 | then |
| 19 | echo "In an overlay environment; skipping tests" |
| 20 | else |
| 21 | for py in $python3_versions; do |
| 22 | echo "Testing with $py:" |
| 23 | HOME=$AUTOPKGTEST_TMP $py -m pytest tests |
| 24 | done |
| 25 | fi |