Revert "tests/libvm: write rpm build logs to file"

This reverts commit 1ef259ed76.

Basically, for historical POSIX compatibility, `errexit` doesn't work at
all inside functions called from an if-statement/boolean context. This
is something I had already learned (and forgotten) when hacking on PAPR.

There are ways around this, but it's just not worth the added complex
shell goop for what it gives us.

http://mywiki.wooledge.org/BashFAQ/105

Closes: #1215
Approved by: cgwalters
This commit is contained in:
Jonathan Lebon 2018-01-18 17:32:43 +00:00 committed by Atomic Bot
parent 83fb40593f
commit 9e24e9c793

View File

@ -347,20 +347,14 @@ vm_assert_status_jq() {
# Like build_rpm, but also sends it to the VM
vm_build_rpm() {
if ! build_rpm "$@" &> build.txt; then
cat build.txt
assert_not_reached "failed to build RPM"
fi
build_rpm "$@"
vm_send_test_repo
}
# Like vm_build_rpm but takes a yumrepo mode
vm_build_rpm_repo_mode() {
mode=$1; shift
if ! build_rpm "$@" &> build.txt; then
cat build.txt
assert_not_reached "failed to build RPM"
fi
build_rpm "$@"
vm_send_test_repo $mode
}