diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..aa4fb0b --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,2 @@ +Tests: unittests +Depends: @, python3-all, python3-pytest diff --git a/debian/tests/unittests b/debian/tests/unittests new file mode 100644 index 0000000..084282f --- /dev/null +++ b/debian/tests/unittests @@ -0,0 +1,13 @@ +#!/bin/sh +set -efu + +pys="$(py3versions -s 2> /dev/null)" + +cp -a README-template.md test "$AUTOPKGTEST_TMP" +ln -s /usr/lib/nagios/plugins/check_systemd "$AUTOPKGTEST_TMP/check_systemd.py" +cd "$AUTOPKGTEST_TMP" + +for py in $pys; do + echo "=== $py ===" + PYTHONPATH=. $py -m pytest --ignore test/test_subprocess.py test 2>&1 +done