| 1 | #!/bin/sh |
| 2 | |
| 3 | set -e |
| 4 | |
| 5 | trap "patch -p1 -R < debian/tests-patches/use_system_liblouis" 0 |
| 6 | |
| 7 | patch -p1 < debian/tests-patches/use_system_liblouis 2>&1 |
| 8 | |
| 9 | dh_autoreconf 2>&1 |
| 10 | dh_auto_configure -- --enable-ucs4 2>&1 |
| 11 | |
| 12 | make -C gnulib 2>&1 |
| 13 | make -C tools/gnulib 2>&1 |
| 14 | make -C tools libbrlcheck.la 2>&1 |
| 15 | make -C tests 2>&1 |
| 16 | |
| 17 | ln -s $PWD/tests $AUTOPKGTEST_TMP |
| 18 | ln -s /usr/share/liblouis/tables $AUTOPKGTEST_TMP/tables |
| 19 | |
| 20 | LOUIS_TABLEPATH=$AUTOPKGTEST_TMP make check -C tests || ( cat tests/test-suite.log ; false ) |
| 21 | |
| 22 | PYVERS="$(py3versions --supported --version 2> /dev/null)" |
| 23 | |
| 24 | fail=0 |
| 25 | for pyver in $PYVERS; do |
| 26 | echo "==================== test with PYTHON $pyver ==================" |
| 27 | if ( cd python ; python$pyver -m pytest tests/ ); |
| 28 | then |
| 29 | echo "==================== test with PYTHON $pyver DONE ==================" |
| 30 | else |
| 31 | echo "==================== test with PYTHON $pyver FAILED ==================" |
| 32 | fail=1 |
| 33 | fi |
| 34 | done |
| 35 | |
| 36 | exit $fail |