From 0728b97e224c4d2f53abced4ff78cc5eeb0f6caf Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 21 Apr 2022 16:04:59 +0100 Subject: [PATCH] test-history: Make it easier to debug on failure If `flatpak history` fails, let's show the log file before failing the test. Signed-off-by: Simon McVittie --- tests/test-history.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test-history.sh b/tests/test-history.sh index c4eb4365..1afc0ca5 100755 --- a/tests/test-history.sh +++ b/tests/test-history.sh @@ -50,8 +50,12 @@ ${FLATPAK} --installation=history-installation uninstall -y org.test.Platform or ${FLATPAK} --installation=history-installation remote-delete test-repo # need --since and --columns here to make the test idempotent -${FLATPAK} --installation=history-installation history --since="${HISTORY_START_TIME}" \ - --columns=change,application,branch,installation,remote > history-log 2>&1 +if ! ${FLATPAK} --installation=history-installation history --since="${HISTORY_START_TIME}" \ + --columns=change,application,branch,installation,remote > history-log 2>&1; then + cat history-log >&2 + echo "Bail out! 'flatpak history' failed" + exit 1 +fi diff history-log - << EOF add remote system (history-installation) test-repo