git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 1/7] ci: consolidate setup of test environment

From
Patrick Steinhardt <ps@pks.im>
Date
Nov 2, 2026, 11:17 UTC
Message-ID
<20261102-b4-pks-ci-test-vars-consolidation-v2-1-a5485c437c62@pks.im>
In-Reply-To
<20261102-b4-pks-ci-test-vars-consolidation-v2-0-a5485c437c62@pks.im>

The setup of our test environment is split up across "ci/lib.sh" and "ci/run-build-and-tests.sh". It is not exactly obvious why that split even exists, and because of the split you have to know about both of the locations to be able to figure out the specific environment that applies to a specific job.

Consolidate the setup into "ci/lib.sh". Note that this is a pure move for now that results in some awkward duplication. This duplication will be cleaned up in subsequent commits.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 ci/lib.sh                 | 43 +++++++++++++++++++++++++++++++++++++++++++
 ci/run-build-and-tests.sh | 44 --------------------------------------------
 2 files changed, 43 insertions(+), 44 deletions(-)
diff --git a/ci/lib.sh b/ci/lib.sh
index 2e63d652543..d0bd8113d35 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -394,7 +394,50 @@ osx-meson)
 	;;
 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
+
+case "$jobname" in
+fedora-breaking-changes-meson|linux-breaking-changes)
+	export WITH_BREAKING_CHANGES=YesPlease
+	MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
+	;;
+linux-feature-testbed)
+	export OPENSSL_SHA1_UNSAFE=YesPlease
+	export GIT_TEST_SPLIT_INDEX=yes
+	export GIT_TEST_FULL_IN_PACK_ARRAY=true
+	export GIT_TEST_OE_SIZE=10
+	export GIT_TEST_OE_DELTA_SIZE=5
+	export GIT_TEST_COMMIT_GRAPH=1
+	export GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1
+	export GIT_TEST_MULTI_PACK_INDEX=1
+	export GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=1
+	export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+	export GIT_TEST_NO_WRITE_REV_INDEX=1
+	export GIT_TEST_CHECKOUT_WORKERS=2
+	export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
+	;;
+linux-sha256)
+	export GIT_TEST_DEFAULT_HASH=sha256
+	;;
+linux-reftable-sha256)
+	export GIT_TEST_DEFAULT_REF_STORAGE_FORMAT=reftable
+	export GIT_TEST_DEFAULT_HASH=sha256
+	;;
+linux-reftable-leaks|osx-reftable)
+	export GIT_TEST_DEFAULT_REF_STORAGE_FORMAT=reftable
+	;;
+esac
+
 MAKEFLAGS="$MAKEFLAGS CC=${CC:-cc}"
+export TEST_CONTRIB_TOO=yes
 
 end_group "CI setup via $(basename $0)"
 set -x
diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
index 68b91e31439..b81d654b561 100755
--- a/ci/run-build-and-tests.sh
+++ b/ci/run-build-and-tests.sh
@@ -5,50 +5,6 @@
 
 . ${0%/*}/lib.sh
 
-export TEST_CONTRIB_TOO=yes
-
-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
-
-case "$jobname" in
-fedora-breaking-changes-meson|linux-breaking-changes)
-	export WITH_BREAKING_CHANGES=YesPlease
-	MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
-	;;
-linux-feature-testbed)
-	export OPENSSL_SHA1_UNSAFE=YesPlease
-	export GIT_TEST_SPLIT_INDEX=yes
-	export GIT_TEST_FULL_IN_PACK_ARRAY=true
-	export GIT_TEST_OE_SIZE=10
-	export GIT_TEST_OE_DELTA_SIZE=5
-	export GIT_TEST_COMMIT_GRAPH=1
-	export GIT_TEST_COMMIT_GRAPH_CHANGED_PATHS=1
-	export GIT_TEST_MULTI_PACK_INDEX=1
-	export GIT_TEST_MULTI_PACK_INDEX_WRITE_INCREMENTAL=1
-	export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
-	export GIT_TEST_NO_WRITE_REV_INDEX=1
-	export GIT_TEST_CHECKOUT_WORKERS=2
-	export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
-	;;
-linux-sha256)
-	export GIT_TEST_DEFAULT_HASH=sha256
-	;;
-linux-reftable-sha256)
-	export GIT_TEST_DEFAULT_REF_STORAGE_FORMAT=reftable
-	export GIT_TEST_DEFAULT_HASH=sha256
-	;;
-linux-reftable-leaks|osx-reftable)
-	export GIT_TEST_DEFAULT_REF_STORAGE_FORMAT=reftable
-	;;
-esac
-
 case "$jobname" in
 *-meson)
 	group "Configure" meson setup build . \
-- 
2.56.0.500.g5d06dc02cd.dirty
Previous: Patrick SteinhardtNext: Patrick Steinhardt
Message 23 of 32 in “ci: consolidate test variables”
  1. 0/8 ci: consolidate test variablesPatrick Steinhardt, Oct 27, 2026
  2. 1/8 ci: consolidate setup of test environmentPatrick Steinhardt, Oct 27, 2026
  3. 2/8 ci/lib: always set GIT_TEST_USE_SET_E on Linux jobsPatrick Steinhardt, Oct 27, 2026
  4. 3/8 ci/lib: deduplicate test variables by pattern matchingPatrick Steinhardt, Oct 27, 2026
  5. 4/8 ci/lib: merge switches for specific job namesPatrick Steinhardt, Oct 27, 2026
  6. 5/8 t: honor default ref storage formatPatrick Steinhardt, Oct 27, 2026
  7. 6/8 ci/lib: add another NO_RUST build using glibcPatrick Steinhardt, Oct 27, 2026
  8. 7/8 ci: don't override initial branch name in testbed jobPatrick Steinhardt, Oct 27, 2026
  9. 8/8 t/test-lib: make feature-testbed job more accessiblePatrick Steinhardt, Oct 27, 2026
  10. Phillip WoodOct 27, 2026
  11. Junio C HamanoOct 27, 2026
  12. Patrick SteinhardtOct 28, 2026
  13. Jeff KingOct 27, 2026
  14. Junio C HamanoOct 27, 2026
  15. Patrick SteinhardtOct 28, 2026
  16. Phillip WoodOct 28, 2026
  17. Patrick SteinhardtNov 2, 2026
  18. Phillip WoodOct 27, 2026
  19. Junio C HamanoOct 27, 2026
  20. Jeff KingOct 27, 2026
  21. Toon ClaesOct 28, 2026
  22. 0/7 ci: consolidate test variablesPatrick Steinhardt, Nov 2, 2026
  23. 1/7 ci: consolidate setup of test environmentPatrick Steinhardt, Nov 2, 2026
  24. 2/7 ci/lib: always set GIT_TEST_USE_SET_E on Linux jobsPatrick Steinhardt, Nov 2, 2026
  25. 3/7 ci/lib: deduplicate test variables by pattern matchingPatrick Steinhardt, Nov 2, 2026
  26. 4/7 ci/lib: merge switches for specific job namesPatrick Steinhardt, Nov 2, 2026
  27. 5/7 t: honor default ref storage formatPatrick Steinhardt, Nov 2, 2026
  28. 6/7 ci/lib: add another NO_RUST build using glibcPatrick Steinhardt, Nov 2, 2026
  29. 7/7 ci: don't override initial branch name in testbed jobPatrick Steinhardt, Nov 2, 2026
  30. Phillip WoodNov 2, 2026
  31. Jeff KingNov 4, 2026
  32. Junio C HamanoNov 4, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.