[PATCH 2/8] ci/lib: always set GIT_TEST_USE_SET_E on Linux jobs

From
Patrick Steinhardt <hidden>
Date
2026-10-27 08:18:39
Reply to
Patrick Steinhardt, 2026-10-27
The GIT_TEST_USE_SET_E test variable determines whether we run our test
suite with `set -e` enabled or not. This works on all of our supported
Linux distributions, but it doesn't work on macOS because the version of
Bash used there is rather old and thus has some differences in
behaviour.

We currently set that variable for a bunch of distros explicitly, which
is tedious to keep up-to-date. For example, our "linux32" job does not
enable the test variable even though it could. Adapt the script to
instead set it on any Linux distribution.

Signed-off-by: Patrick Steinhardt <redacted>
---
 ci/lib.sh | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/ci/lib.sh b/ci/lib.sh
index d0bd8113d35..560d785f67c 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -367,6 +367,12 @@ esac
 CUSTOM_PATH="${CUSTOM_PATH:-$HOME/path}"
 export PATH="$CUSTOM_PATH:$PATH"
 
+case "$CI_OS_NAME" in
+linux)
+	export GIT_TEST_USE_SET_E=yes
+	;;
+esac
+
 case "$jobname" in
 linux32)
 	CC=gcc
@@ -397,10 +403,6 @@ esac
 case "$jobname" in
 linux-musl-meson)
 	MESONFLAGS="$MESONFLAGS -Drust=disabled"
-	export GIT_TEST_USE_SET_E=yes
-	;;
-almalinux-*|debian-*|fedora-*|linux-*)
-	export GIT_TEST_USE_SET_E=yes
 	;;
 esac
 
-- 
2.56.0.341.g393f52fd96.dirty
Thread (32 messages) 32 messages, 5 authors, last reply 4d ago
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help