]> git.ipfire.org Git - thirdparty/git.git/commitdiff
ci: make test slicing consistent across Meson/Make
authorPatrick Steinhardt <ps@pks.im>
Thu, 19 Feb 2026 06:25:31 +0000 (07:25 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 19 Feb 2026 18:22:31 +0000 (10:22 -0800)
In the preceding commit we have adjusted test slicing to be one-based
when using the "ci/run-test-slice.sh" script. But we also have an
equivalent script for Meson that is still zero-based, which is of course
inconsistent.

Adapt the script to be one-based, as well, and adapt the GitHub workflow
accordingly. Note that GitLab doesn't yet use the script, so it does not
need to be adapted. This will change in the next commit though.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.github/workflows/main.yml
ci/run-test-slice-meson.sh

index a011d8d0f93bed0956dd9dec8da71169d30a389a..826f2f5d3a6a88b118011486b8657a785e266545 100644 (file)
@@ -298,7 +298,7 @@ jobs:
         path: build
     - name: Test
       shell: bash
-      run: ci/run-test-slice-meson.sh build ${{matrix.nr}} 10
+      run: ci/run-test-slice-meson.sh build $((${{matrix.nr}} + 1)) 10
     - name: print test failures
       if: failure() && env.FAILED_TEST_ARTIFACTS != ''
       shell: bash
index 961c94fba0b2ee18210a3ee3eb8248e01af3fed2..a6df927ba591f82772110b9b21ec3f769bf4df04 100755 (executable)
@@ -9,5 +9,5 @@
 
 group "Run tests" \
        meson test -C "$1" --no-rebuild --print-errorlogs \
-               --test-args="$GIT_TEST_OPTS" --slice "$((1+$2))/$3" ||
+               --test-args="$GIT_TEST_OPTS" --slice "$(($2))/$3" ||
 handle_failed_tests