mirror of
https://gitlab.com/apparmor/apparmor
synced 2025-08-22 10:07:12 +00:00
Merge tests: provide better output on failures
When a test fails because of an unexpected success (XFAIL), do not display the empty error log as that may confuse the reader just as it had confused the author. In addition, when something legitimately fails then display tail of trace log as that may show some useful information. Signed-off-by: Zygmunt Krynicki <zygmunt.krynicki@canonical.com> MR: https://gitlab.com/apparmor/apparmor/-/merge_requests/1548 Approved-by: John Johansen <john@jjmx.net> Merged-by: John Johansen <john@jjmx.net> (cherry picked from commit 8711c7754b8f45c190830ac88ba7954b72bcb0b5)
This commit is contained in:
commit
3aa8c4959f
@ -123,14 +123,13 @@ execute: |
|
||||
echo "Test execution logs are in the files bash.{log,err,trace} and are collected as artifacts"
|
||||
echo "Bash errors are listed below:"
|
||||
cat bash.err
|
||||
echo "Tail of the trace is:"
|
||||
tail bash.trace
|
||||
exit 1
|
||||
else
|
||||
for xfail in ${XFAIL:-}; do
|
||||
if [ "$SPREAD_SYSTEM" = "$xfail" ]; then
|
||||
echo "Test $SPREAD_VARIANT has unexpectedly passed"
|
||||
echo "Test execution logs are in the files bash.{log,err,trace} and are collected as artifacts"
|
||||
echo "Bash errors are listed below:"
|
||||
cat bash.err
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
|
Loading…
x
Reference in New Issue
Block a user