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 <smcv@collabora.com>
This commit is contained in:
Simon McVittie
2022-04-21 16:04:59 +01:00
committed by Alexander Larsson
parent 3e8319c9b4
commit 0728b97e22

View File

@@ -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