diff options
Diffstat (limited to '')
-rw-r--r-- | debian/tests/control | 10 | ||||
-rw-r--r-- | debian/tests/flit-user | 27 |
2 files changed, 37 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..abb280a --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,10 @@ +Tests: flit-user +Depends: + python3-all, + python3-docutils, + python3-pytest, + python3-requests, + python3-responses, + python3-testpath, + @ +Restrictions: allow-stderr diff --git a/debian/tests/flit-user b/debian/tests/flit-user new file mode 100644 index 0000000..3aeb71f --- /dev/null +++ b/debian/tests/flit-user @@ -0,0 +1,27 @@ +#!/bin/sh +set -e + +user=testing + +if [ "$AUTOPKGTEST_TMP" = "" ] ; then + AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX) +fi +cd "$AUTOPKGTEST_TMP" + +if [ $(id -u) = 0 ] +then + adduser --quiet --system --group --no-create-home $user + chown -R $user . + runuser="runuser -p -u $user --" +else + runuser="" +fi + +for py in $(py3versions -s); do + $runuser $py -m pytest -k 'not test_find_in_path' --pyargs flit_core +done + +if [ $(id -u) = 0 ] +then + deluser --quiet $user +fi |