tools/ci.sh: Manipulate pipefail better.

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
Jeff Epler
2025-09-03 13:45:41 -05:00
committed by Damien George
parent fef414eca4
commit 77729fe3f7

View File

@@ -105,13 +105,11 @@ function ci_code_size_build {
git submodule update --init $SUBMODULES
git show -s
tools/metrics.py clean $PORTS_TO_CHECK
tools/metrics.py build $PORTS_TO_CHECK | tee $OUTFILE
# Allow errors from tools/metrics.py to propagate out of the pipe above.
(set -o pipefail; tools/metrics.py build $PORTS_TO_CHECK | tee $OUTFILE)
return $?
}
# Allow errors from tools/metrics.py to propagate out of the pipe above.
set -o pipefail
# build reference, save to size0
# ignore any errors with this build, in case master is failing
code_size_build_step $REFERENCE ~/size0
@@ -119,7 +117,6 @@ function ci_code_size_build {
code_size_build_step $COMPARISON ~/size1
STATUS=$?
set +o pipefail
unset -f code_size_build_step
return $STATUS