commit: c5f7cb6c9cebcb3551129940b24f2377de503702
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 23 17:50:25 2024 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Wed Jan 24 15:54:40 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c5f7cb6c
gap-pkg.eclass: enable pipefail when piping tests through tee
In src_test(), we are running,
${gapcmd} | tee test-suite.log
to work around a terminal corruption issue in dev-gap/browse. This pipe
however has the unfortunate side effect of hiding failures in ${gapcmd}
behind the success of tee. To fix that, we enable pipefail for the
duration of the command above.
Signed-off-by: Michael Orlitzky <mjo <AT> gentoo.org>
eclass/gap-pkg.eclass | 2 ++
1 file changed, 2 insertions(+)
diff --git a/eclass/gap-pkg.eclass b/eclass/gap-pkg.eclass
index 89c158674b0f..e242cc92e8a3 100644
--- a/eclass/gap-pkg.eclass
+++ b/eclass/gap-pkg.eclass
@@ -231,8 +231,10 @@ gap-pkg_src_test() {
# The "browse" package is however smart enough to figure out when
# stdout is not a tty, and avoids breaking it in that case. So by
# piping to tee, we encourage it not to do anything too crazy.
+ eshopts_push -o pipefail
${gapcmd} | tee test-suite.log \
|| die "test suite failed, see test-suite.log"
+ eshopts_pop
}
# @ECLASS_VARIABLE: GAP_PKG_EXTRA_INSTALL