Commit 83b617fe authored by Jérémy Bobbio (Lunar)'s avatar Jérémy Bobbio (Lunar)
Browse files

Run test during Debian package build and add autopkgtest support

We now ship the full test directory with the Python package.

This allows to run the test suite during Debian package build, and add
autopkgtest support that will run testsuite against the installed
package.
parent 2938de1d8995
include ChangeLog
include COPYING
include COPYING.LESSER
include test/data.txt.gz test/hello.odt
recursive-include test *
include __pkginfo__.py
......@@ -6,6 +6,8 @@ logilab-mtconverter (0.9.0-2) UNRELEASED; urgency=medium
- Use PYBUILD_NAME instead of debian/*.install files.
- Update minimum Python versions to supported ones.
- Update Standards-Version to 4.3.0.
- Run testsuite at build time.
- Add autopkgtest support to run testsuite against the installed package.
-- Jérémy Bobbio <jeremy.bobbio@irq7.fr> Wed, 05 Jun 2019 14:07:32 +0200
......
......@@ -10,6 +10,16 @@ Build-Depends:
python3-all,
python-setuptools,
python3-setuptools,
python-six,
python3-six,
python-html2text,
python3-html2text,
python-lxml,
python3-lxml,
python-pygments,
python3-pygments,
python-logilab-common,
python3-logilab-common
X-Python-Version: >= 2.7
X-Python3-Version: >= 3.4
Standards-Version: 4.3.0
......
test
logilab_mtconverter.egg-info
#!/usr/bin/make -f
export PYBUILD_NAME = logilab-mtconverter
export PYBUILD_DISABLE = test
export PYBUILD_TEST_ARGS = -v -s test -p 'unittest*py'
%:
dh $@ --with python2,python3 --buildsystem=pybuild
Tests: unittest
Depends:
@, @builddeps@, poppler-utils, python-pil, python3-pil, texlive-latex-base
Restrictions: allow-stderr
#!/bin/sh
set -e
set -x
### Setup tests
cp -r test "$AUTOPKGTEST_TMP"
### Run tests
for py in $(pyversions -r 2>/dev/null) $(py3versions -r 2>/dev/null); do
cd "$AUTOPKGTEST_TMP"
echo "Testing with $py:"
$py -m unittest discover -s test -p 'unittest_*.py' -v
done
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment