admin-test: Show err.txt on unexpected failure
In a CI run I think one of these `ostree show` commands is failing. While that output would be useful, the actual `err.txt` usually has what we want too.
This commit is contained in:
parent
5a82d75adb
commit
191ce95ca1
|
|
@ -306,8 +306,7 @@ prev_rev=$(${CMD_PREFIX} ostree rev-parse --repo=sysroot/ostree/repo testos/buil
|
||||||
assert_not_streq ${head_rev} ${prev_rev}
|
assert_not_streq ${head_rev} ${prev_rev}
|
||||||
# check that we can't "upgrade" to an older commit without --allow-downgrade
|
# check that we can't "upgrade" to an older commit without --allow-downgrade
|
||||||
if ${CMD_PREFIX} ostree admin upgrade --os=testos --override-commit=${prev_rev} 2> err.txt; then
|
if ${CMD_PREFIX} ostree admin upgrade --os=testos --override-commit=${prev_rev} 2> err.txt; then
|
||||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo show "${prev_rev}"
|
cat err.txt
|
||||||
${CMD_PREFIX} ostree --repo=sysroot/ostree/repo show "${head_rev}"
|
|
||||||
fatal "downgraded without --allow-downgrade?"
|
fatal "downgraded without --allow-downgrade?"
|
||||||
fi
|
fi
|
||||||
assert_file_has_content err.txt "Upgrade.*is chronologically older"
|
assert_file_has_content err.txt "Upgrade.*is chronologically older"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue