summaryrefslogtreecommitdiffstats
path: root/debian/tests
diff options
context:
space:
mode:
Diffstat (limited to 'debian/tests')
-rw-r--r--debian/tests/control3
-rwxr-xr-xdebian/tests/run-unit-test21
2 files changed, 24 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..ce868e1
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,3 @@
+Tests: run-unit-test
+Depends: python3-all, python3-tomli-w, python3-tomli, python3-pytest-xdist
+Restrictions: allow-stderr
diff --git a/debian/tests/run-unit-test b/debian/tests/run-unit-test
new file mode 100755
index 0000000..9d5a3b7
--- /dev/null
+++ b/debian/tests/run-unit-test
@@ -0,0 +1,21 @@
+#!/bin/bash
+set -ex
+
+pkg=python3-tomli-w
+
+START="$(dirname "$(dirname "$(dirname "$(readlink -fm "$0")")")")"
+
+if [ "$AUTOPKGTEST_TMP" = "" ] ; then
+ AUTOPKGTEST_TMP=$(mktemp -d /tmp/${pkg}-test.XXXXXX)
+ trap "rm -rf $AUTOPKGTEST_TMP" 0 INT QUIT ABRT PIPE TERM
+fi
+
+cd "$AUTOPKGTEST_TMP"
+
+cp -r ${START}/tests ./
+cp -r ${START}/benchmark ./
+
+for py3vers in $(py3versions -s); do
+ echo "Testing with $py3vers:"
+ $py3vers -m pytest -v
+done