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

[PATCH v2 9/9] gitlab-ci: enable "GIT_TEST_LONG"

From
Patrick Steinhardt <ps@pks.im>
Date
Jul 3, 2026, 09:24 UTC
Message-ID
<20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-9-79076a7e0c62@pks.im>
In-Reply-To
<20260703-b4-pks-t-fixes-for-GIT-TEST-LONG-v2-0-79076a7e0c62@pks.im>

Starting with 7a094d68a2 (ci: run expensive tests on push builds to integration branches, 2026-05-08) we run expensive tests in our CI for certain events. So far, this has only been wired up for GitHub Workflows though, which creates a test gap for GitLab CI.

Plug this gap by also making this work for the latter.

Note that these tests cannot be run on the Windows runners, as they only have 7.5GB of RAM. This is insufficient for some of the EXPENSIVE tests, so we explicitly disable "GIT_TEST_LONG" on these jobs.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
---
 .gitlab-ci.yml |  6 ++++++
 ci/lib.sh      | 12 ++++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index a4aebe8b71..1c4d04da9d 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -147,6 +147,9 @@ test:mingw64:
   needs:
     - job: "build:mingw64"
       artifacts: true
+  variables:
+    # Windows runners don't have enough RAM to run EXPENSIVE tests.
+    GIT_TEST_LONG: false
   before_script:
     - *windows_before_script
     - git-sdk/usr/bin/bash.exe -l -c 'tar xf artifacts/artifacts.tar.gz'
@@ -195,6 +198,9 @@ test:msvc-meson:
   script:
     - |
       & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'
+  variables:
+    # Windows runners don't have enough RAM to run EXPENSIVE tests.
+    GIT_TEST_LONG: false
   after_script:
     - |
       if ($env:CI_JOB_STATUS -ne "success") {
diff --git a/ci/lib.sh b/ci/lib.sh
index 01a0bc6b75..6c52154eac 100755
--- a/ci/lib.sh
+++ b/ci/lib.sh
@@ -215,6 +215,7 @@ then
 	test macos != "$CI_OS_NAME" || CI_OS_NAME=osx
 	CI_REPO_SLUG="$GITHUB_REPOSITORY"
 	CI_JOB_ID="$GITHUB_RUN_ID"
+	CI_EVENT="$GITHUB_EVENT_NAME"
 	CC="${CC_PACKAGE:-${CC:-gcc}}"
 	DONT_SKIP_TAGS=t
 	handle_failed_tests () {
@@ -239,6 +240,13 @@ then
 	CI_BRANCH="$CI_COMMIT_REF_NAME"
 	CI_COMMIT="$CI_COMMIT_SHA"
 
+	case "$CI_PIPELINE_SOURCE" in
+	merge_request_event)
+		CI_EVENT=pull_request;;
+	*)
+		CI_EVENT="$CI_PIPELINE_SOURCE";;
+	esac
+
 	case "$OS,$CI_JOB_IMAGE" in
 	Windows_NT,*)
 		CI_OS_NAME=windows
@@ -319,9 +327,9 @@ export SKIP_DASHED_BUILT_INS=YesPlease
 # enable "expensive" tests for PR events.
 # In order to catch bugs introduced at integration time by mismerges,
 # enable the long tests for pushes to the integration branches as well.
-case "$GITHUB_EVENT_NAME,$CI_BRANCH" in
+case "$CI_EVENT,$CI_BRANCH" in
 pull_request,*|push,*next*|push,*master*|push,*main*|push,*maint*)
-	export GIT_TEST_LONG=true
+	export GIT_TEST_LONG=${GIT_TEST_LONG:-true}
 	;;
 esac
 
-- 
2.55.0.795.g602f6c329a.dirty
Previous: Patrick Steinhardt
Message 33 of 33 in “t: fixes and improvements for GIT_TEST_LONG”
  1. 0/9 t: fixes and improvements for GIT_TEST_LONGPatrick Steinhardt, Jul 2, 2026
  2. 1/9 README: add GitLab CI badge to make it more discoverablePatrick Steinhardt, Jul 2, 2026
  3. 2/9 t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BITPatrick Steinhardt, Jul 2, 2026
  4. 3/9 t4141: fix inefficient use of dd(1)Patrick Steinhardt, Jul 2, 2026
  5. SZEDER GáborJul 2, 2026
  6. Patrick SteinhardtJul 3, 2026
  7. Jeff KingJul 2, 2026
  8. Patrick SteinhardtJul 3, 2026
  9. Jeff KingJul 3, 2026
  10. 4/9 t5608: reduce maximum disk usagePatrick Steinhardt, Jul 2, 2026
  11. 5/9 t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BITPatrick Steinhardt, Jul 2, 2026
  12. Jeff KingJul 2, 2026
  13. Jeff KingJul 2, 2026
  14. 6/9 t7900: clean up large EXPENSIVE repositoryPatrick Steinhardt, Jul 2, 2026
  15. Jeff KingJul 2, 2026
  16. Patrick SteinhardtJul 3, 2026
  17. Jeff KingJul 3, 2026
  18. 7/9 t: use `test_bool_env` to parse GIT_TEST_LONGPatrick Steinhardt, Jul 2, 2026
  19. 8/9 gitlab-ci: disable RAM disk on macOS jobsPatrick Steinhardt, Jul 2, 2026
  20. 9/9 gitlab-ci: enable "GIT_TEST_LONG"Patrick Steinhardt, Jul 2, 2026
  21. 0/9 t: fixes and improvements for GIT_TEST_LONGPatrick Steinhardt, Jul 3, 2026
  22. 1/9 README: add GitLab CI badge to make it more discoverablePatrick Steinhardt, Jul 3, 2026
  23. 2/9 t0021: skip EXPENSIVE test that is broken without SIZE_T_IS_32BITPatrick Steinhardt, Jul 3, 2026
  24. Junio C HamanoJul 3, 2026
  25. Patrick SteinhardtJul 6, 2026
  26. 3/9 t4141: fix inefficient use of dd(1)Patrick Steinhardt, Jul 3, 2026
  27. 4/9 t5608: reduce maximum disk usagePatrick Steinhardt, Jul 3, 2026
  28. 5/9 t7508: skip EXPENSIVE test that is broken without SIZE_T_IS_32BITPatrick Steinhardt, Jul 3, 2026
  29. Junio C HamanoJul 3, 2026
  30. 6/9 t7900: clean up large EXPENSIVE repositoryPatrick Steinhardt, Jul 3, 2026
  31. 7/9 t: use `test_bool_env` to parse GIT_TEST_LONGPatrick Steinhardt, Jul 3, 2026
  32. 8/9 gitlab-ci: disable RAM disk on macOS jobsPatrick Steinhardt, Jul 3, 2026
  33. 9/9 gitlab-ci: enable "GIT_TEST_LONG"Patrick Steinhardt, Jul 3, 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.