From 4f162c2f63796411467b816ccd80a20b2c248e72 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 2 Sep 2025 16:48:49 +0000 Subject: Show command in test failure messages if default is overridden Tests usually print the command they run, but it can be overridden with a chosen message to make clearer what is actually tested. To debug failures it can be useful to know the command run through especially if its a partly generated command depending on the test environment (like in the kernel autoremove test). --- test/integration/test-kernel-helper-autoremove | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test/integration/test-kernel-helper-autoremove') diff --git a/test/integration/test-kernel-helper-autoremove b/test/integration/test-kernel-helper-autoremove index 20a09685a..a7008799c 100755 --- a/test/integration/test-kernel-helper-autoremove +++ b/test/integration/test-kernel-helper-autoremove @@ -29,8 +29,8 @@ testsuccess aptmark auto "$CURRENTKERNEL" "${CURRENTKERNEL}-dbg" "${CURRENTKERNE testsuccess aptmark hold "${CURRENTKERNEL}-rt" testprotected() { - testsuccess --nomsg apt -o Debug::PkgAutoRemove=1 autoremove -s - grep "Kernel protection regex" rootdir/tmp/testsuccess.output | cut -f2- -d: | tr '|' '\n' | sed 's/\s*//g' | sort -u > protected.list + testsuccess apt -o Debug::PkgAutoRemove=1 autoremove -s + grep "Kernel protection regex" rootdir/tmp/testsuccess.output | cut -f2- -d: | tr '|' '\n' | sed 's/\s*//g' | sort -u > protected.list msgtest 'Check kernel autoremoval protection list' 'can be parsed' testfailure --nomsg grep '^[A-Z]: ' protected.list -- cgit v1.2.3-70-g09d2