From c7dedfd7e13073c98fefbeff10b69c7512a8366e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 15 Oct 2024 15:10:34 +0200 Subject: test framework: Improve valgrind support Add support for testing apt-ftparchive, set valgrind to quiet such that we can check program output, and pass --error-exitcode=7 to get an (should be unused) magic error code if it detects errors. --- test/integration/framework | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'test/integration') diff --git a/test/integration/framework b/test/integration/framework index e13888da2..477aebd39 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -250,10 +250,13 @@ valgrind() { *) CMD="$1";; esac shift + if [ "$CMD" = "apt-ftparchive" ]; then + CMD="${APTFTPARCHIVEBINDIR}/${CMD}" + fi if [ "${CMD##*/}" = "$CMD" ]; then CMD="${APTCMDLINEBINDIR}/${CMD}" fi - runapt command valgrind "$CMD" "$@" + runapt command valgrind -q --error-exitcode=7 "$CMD" "$@" } lastmodification() { -- cgit v1.2.3-70-g09d2