Package: src:libxcrypt Version: 1:4.4.15-1 Tags: patch run tests as autopkg test. I didn't investigate yet, why the one test fails using this approach.
diff -Nru libxcrypt-4.4.10/debian/changelog libxcrypt-4.4.10/debian/changelog --- libxcrypt-4.4.10/debian/changelog 2020-03-04 10:28:00.000000000 +0100 +++ libxcrypt-4.4.10/debian/changelog 2020-03-06 09:55:32.000000000 +0100 @@ -1,3 +1,9 @@ +libxcrypt (1:4.4.10-10ubuntu3) focal; urgency=medium + + * Add an autopkg test to run the tests with the install library. + + -- Matthias Klose <d...@ubuntu.com> Fri, 06 Mar 2020 09:55:32 +0100 + libxcrypt (1:4.4.10-10ubuntu2) focal; urgency=medium * Adjust Breaks/Replaces for libc*. diff -Nru libxcrypt-4.4.10/debian/tests/control libxcrypt-4.4.10/debian/tests/control --- libxcrypt-4.4.10/debian/tests/control 1970-01-01 01:00:00.000000000 +0100 +++ libxcrypt-4.4.10/debian/tests/control 2020-03-06 09:55:32.000000000 +0100 @@ -0,0 +1,3 @@ +Tests: testsuite +Depends: @ +Restrictions: build-needed, allow-stderr diff -Nru libxcrypt-4.4.10/debian/tests/testsuite libxcrypt-4.4.10/debian/tests/testsuite --- libxcrypt-4.4.10/debian/tests/testsuite 1970-01-01 01:00:00.000000000 +0100 +++ libxcrypt-4.4.10/debian/tests/testsuite 2020-03-06 09:54:52.000000000 +0100 @@ -0,0 +1,38 @@ +#!/bin/sh + +set -e + +WORKDIR=$(mktemp -d) +trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM + +# copy the built tests (not the libtool wrappers) +cp -a build-deb1/test/.libs/* $WORKDIR + +cd $WORKDIR +ls -l +errs= + +for t in *; do + case $t in fcrypt-enosys) + echo "========== Skipping test $t ==========" + continue + esac + + echo "========== Running test $t ==========" + if [ -f ./$t ] && [ -x ./$t ]; then + if ./$t; then + echo "========== OK $t ==========" + else + echo "========== FAIL $t ==========" + errs="$errs $t" + fi + fi +done + +if [ -n "$errs" ]; then + echo "Testsuite failed ($errs)" + exit 1 +else + echo "Testsuite passed" + exit 0 +fi