| 1 | #!/bin/sh |
| 2 | # autopkgtest check based on upstream check ($ make -C test) |
| 3 | # written for Debian by Jerome Benoit <[email protected]> on behalf of the Debian Tex Maintainers team |
| 4 | # copyright: 2015-2020 Jerome Benoit <[email protected]> |
| 5 | # distributed under the terms and conditions of GPL version 2 or later |
| 6 | |
| 7 | set -ue |
| 8 | |
| 9 | cp -prd test $AUTOPKGTEST_TMP |
| 10 | |
| 11 | cat << EOF > $AUTOPKGTEST_TMP/test/GNUmakefile |
| 12 | #!/usr/bin/make -f |
| 13 | |
| 14 | PERL = /usr/bin/perl |
| 15 | |
| 16 | BIBTOOLPROG = /usr/bin/bibtool |
| 17 | |
| 18 | default: |
| 19 | |
| 20 | check: |
| 21 | BIBTOOL_PRG=\$(BIBTOOLPROG) \$(PERL) -Ilib -MBUnit -e "exit all()" || ( find . -name '*.err*' -o -name '*.out*' -printf "\n%f" | sort | xargs tail -n +1 ; exit 1 ; ) |
| 22 | |
| 23 | clean: |
| 24 | rm -f *.out* *.err* |
| 25 | |
| 26 | EOF |
| 27 | |
| 28 | for btt in lib__check_y.t lib__improve.t ; do |
| 29 | fnbtt=$AUTOPKGTEST_TMP/test/${btt} |
| 30 | if [ -f ${fnbtt} ]; then |
| 31 | sed -i '/^\([\t ]*\)BIBTOOL\([ ]*\)=>/d' ${fnbtt} |
| 32 | fi |
| 33 | done |
| 34 | |
| 35 | make -C $AUTOPKGTEST_TMP/test check |
| 36 | |
| 37 | exit 0 |