#!/bin/sh set -eu WORKDIR=$(mktemp -d) trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM # Copy the source tree: cp -r . $WORKDIR cd $WORKDIR # Use installed binaries: sed -i -e "s/-I\$(top_srcdir)[^[:blank:]]*/\$\$(pkg-config --cflags --libs ticonv)/" \ -e "s/\$(top_builddir)[^[:blank:]]*/\$\$(pkg-config --libs ticonv)/" \ -e "s/LDADD/LDFLAGS/" tests/Makefile.am # Clean if necessary: if [ -f debian/autoreconf.before ]; then dh_auto_clean dh_autoreconf_clean fi # Reconfigure: dh_autoreconf dh_auto_configure # Run the tests: make check # Show if linked to the system's libs: ldd tests/test_ticonv tests/torture_ticonv # Log the test output: if [ -f tests/test-suite.log ]; then cat tests/test-suite.log fi