From 77729fe3f7198dc5c6f353ec78856159544c7abf Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Wed, 3 Sep 2025 13:45:41 -0500 Subject: [PATCH] tools/ci.sh: Manipulate pipefail better. Signed-off-by: Jeff Epler --- tools/ci.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/ci.sh b/tools/ci.sh index a5555647bd..64c9d465d8 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -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