From 1cdf18030814cb0ea45dce54bc3d23fae6818583 Mon Sep 17 00:00:00 2001 From: Anthony PERARD Date: Mon, 2 Jun 2025 11:19:22 +0200 Subject: [PATCH] CI: Fix status check for tools/tests Without "pipefail", $? have the exit value of `tee`, which should always be 0. But instead of using "pipefail", do collect the value of from the test with $PIPESTATUS. Signed-off-by: Anthony PERARD Reviewed-by: Andrew Cooper Acked-by: Stefano Stabellini --- automation/scripts/run-tools-tests | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/automation/scripts/run-tools-tests b/automation/scripts/run-tools-tests index 18687f61a3..cbdd79f6db 100755 --- a/automation/scripts/run-tools-tests +++ b/automation/scripts/run-tools-tests @@ -20,7 +20,7 @@ for f in "$1"/*; do echo "Running $f" printf ' \n' "$f" >> "$xml_out" "$f" 2>&1 | tee /tmp/out - ret=$? + ret=${PIPESTATUS[0]} if [ "$ret" -ne 0 ]; then echo "FAILED: $f" failed+=" $f"