Use pipefail bash feature to show progress

Use tee to display current progress, while also keeping error status
from the pipeline to rlRun.
This commit is contained in:
Petr Menšík 2025-02-07 15:00:53 +01:00
commit e55883b041

View file

@ -252,7 +252,9 @@ rlJournalStart
export KRB5_CONFIG=/dev/null
chmod a+rw -R /root #running as a USER
RHEL9HACK="sudo -u $USER"
rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} &> $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed"
set -o pipefail
rlRun "${RHEL9HACK} make ${MAKE_TEST:-test -j$CORES} |& tee $TMPDIR/test.txt" 0-255 "Perform the test, --init-task=/distribution/install/rhel-buildroot is needed"
set +o pipefail
export -n KRB5_CONFIG
rlRun "umask $UMASK_ORIG" 0 "Return original umask"