summaryrefslogtreecommitdiff
path: root/test/integration
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2024-10-15 15:10:34 +0200
committerJulian Andres Klode <julian.klode@canonical.com>2024-10-15 15:10:34 +0200
commitc7dedfd7e13073c98fefbeff10b69c7512a8366e (patch)
tree36af5c5838ae5df2f9a57ae1646d03807ee0d53b /test/integration
parent604d1fac652965ec71629fec09ca39660c8bb8dc (diff)
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.
Diffstat (limited to 'test/integration')
-rw-r--r--test/integration/framework5
1 files changed, 4 insertions, 1 deletions
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() {