diff options
Diffstat (limited to 'debian/tests')
-rw-r--r-- | debian/tests/control | 45 | ||||
-rwxr-xr-x | debian/tests/dh-python | 2 | ||||
-rwxr-xr-x | debian/tests/nosetests | 13 | ||||
-rwxr-xr-x | debian/tests/pybuild | 2 | ||||
-rwxr-xr-x | debian/tests/pybuild-autopkgtest | 2 | ||||
-rwxr-xr-x | debian/tests/run-installed | 13 |
6 files changed, 77 insertions, 0 deletions
diff --git a/debian/tests/control b/debian/tests/control new file mode 100644 index 0000000..1c3c76f --- /dev/null +++ b/debian/tests/control @@ -0,0 +1,45 @@ +Tests: dh-python +Depends: + build-essential, + debhelper, + dh-python, + fakeroot, + libjs-jquery, + python3-all-dbg, + python3-all-dev +Restrictions: allow-stderr + +Tests: nosetests +Depends: + dh-python, + flit, + python3-all, + python3-all-dbg, + python3-nose2 +Restrictions: allow-stderr + +Tests: pybuild +Depends: + build-essential, + debhelper, + dh-python, + pybuild-plugin-pyproject, + flit, + fakeroot, + python3-all-dev, + python3-poetry-core, + python3-pytest, + python3-setuptools, + python3-tomli, + tox +Restrictions: allow-stderr + +Tests: pybuild-autopkgtest +Depends: + autopkgtest, + debhelper, + dh-python, + make, + pybuild-plugin-pyproject, + python3-all, +Restrictions: allow-stderr diff --git a/debian/tests/dh-python b/debian/tests/dh-python new file mode 100755 index 0000000..738c306 --- /dev/null +++ b/debian/tests/dh-python @@ -0,0 +1,2 @@ +#!/bin/sh +exec debian/tests/run-installed diff --git a/debian/tests/nosetests b/debian/tests/nosetests new file mode 100755 index 0000000..9d858b8 --- /dev/null +++ b/debian/tests/nosetests @@ -0,0 +1,13 @@ +#!/bin/sh + +set -eu + +cp -r tests "$AUTOPKGTEST_TMP" +cd "$AUTOPKGTEST_TMP" + +for py in $(py3versions -s); do + $py -m nose2 --verbose --plugin nose2.plugins.doctests --with-doctest \ + --start-dir /usr/share/dh-python/dhpython + + PYTHONPATH=/usr/share/dh-python $py -m nose2 -v tests +done diff --git a/debian/tests/pybuild b/debian/tests/pybuild new file mode 100755 index 0000000..5c50fe7 --- /dev/null +++ b/debian/tests/pybuild @@ -0,0 +1,2 @@ +#!/bin/sh +exec debian/tests/run-installed testpb01 testpb02 testpb04 testpb05 testpb06 testpb07 diff --git a/debian/tests/pybuild-autopkgtest b/debian/tests/pybuild-autopkgtest new file mode 100755 index 0000000..e1273f0 --- /dev/null +++ b/debian/tests/pybuild-autopkgtest @@ -0,0 +1,2 @@ +#!/bin/sh +exec debian/tests/run-installed testa01 testa02 diff --git a/debian/tests/run-installed b/debian/tests/run-installed new file mode 100755 index 0000000..fe0ffb2 --- /dev/null +++ b/debian/tests/run-installed @@ -0,0 +1,13 @@ +#!/bin/sh + +set -eu +cp -r tests "$AUTOPKGTEST_TMP" +cd "$AUTOPKGTEST_TMP/tests" +sed -i "s/\.\.\/\.\.\/debian/\/usr\/share\/python3/g" common.mk +sed -i "s/\.\.\/\.\.\/dhpython/\/usr\/share\/dh-python\/dhpython/g" common.mk +sed -i "s/PYTHONPATH=\.\.\/\.\.\//PYTHONPATH=\/usr\/share\/python3/g" t*/debian/rules +sed -i "s/\.\.\/\.\.\/debian\///g" t*/debian/rules +sed -i "s/\.\.\/\.\.\/dh_py/\/usr\/share\/dh-python\/dh_py/g" t*/debian/rules +sed -i "s/\.\.\/\.\.\///g" t*/debian/rules + +make "$@" |