]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Revert "Merge branch 'ps/ci-gitlab-msvc-updates' into next"
authorJunio C Hamano <gitster@pobox.com>
Tue, 10 Feb 2026 22:10:48 +0000 (14:10 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 10 Feb 2026 22:10:48 +0000 (14:10 -0800)
This reverts commit 378f67d678fb667f93609bd732ca3b80f83f690d, reversing
changes made to 5e3bc9f2b98da70799301c4e8a41fdcd0371ebef.

Direct arithmetic operations (like +, -, *, /) are not directly
supported within GitHub Actions expressions inside ${{ ... }}
syntax.

Invalid workflow file: .github/workflows/main.yml#L1
(Line: 153, Col: 12): Unexpected symbol: '+'. Located at position 11
within expression: matrix.nr + 1, (Line: 301, Col: 12): Unexpected
symbol: '+'. Located at position 11 within expression: matrix.nr + 1

.github/workflows/main.yml
.gitlab-ci.yml
ci/run-test-slice-meson.sh
ci/run-test-slice.sh
t/helper/test-path-utils.c

index 1b7a16e1f1c7c88a765745bff12f0c732966c6d8..f2e93f54611b62268a441014d1b7e310e29875c4 100644 (file)
@@ -150,7 +150,7 @@ jobs:
     - uses: git-for-windows/setup-git-for-windows-sdk@v1
     - name: test
       shell: bash
-      run: . /etc/profile && ci/run-test-slice.sh ${{ matrix.nr + 1 }} 10
+      run: . /etc/profile && ci/run-test-slice.sh ${{matrix.nr}} 10
     - name: print test failures
       if: failure() && env.FAILED_TEST_ARTIFACTS != ''
       shell: bash
@@ -298,7 +298,7 @@ jobs:
         path: build
     - name: Test
       shell: pwsh
-      run: ci/run-test-slice-meson.sh build ${{matrix.nr + 1}} 10
+      run: ci/run-test-slice-meson.sh build ${{matrix.nr}} 10
     - name: print test failures
       if: failure() && env.FAILED_TEST_ARTIFACTS != ''
       shell: bash
index 71b8a6e642d9cf0354aff26e1081d44cf8106740..b419a84e2cc6609c0525993411e80b6265ac538b 100644 (file)
@@ -157,8 +157,6 @@ test:mingw64:
   parallel: 10
 
 .msvc-meson:
-  variables:
-    TEST_OUTPUT_DIRECTORY: "C:/Git-Test"
   tags:
     - saas-windows-medium-amd64
   before_script:
@@ -166,13 +164,12 @@ test:mingw64:
     - choco install -y git meson ninja rust-ms
     - Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
     - refreshenv
-    - New-Item -Path $env:TEST_OUTPUT_DIRECTORY -ItemType Directory
 
 build:msvc-meson:
   extends: .msvc-meson
   stage: build
   script:
-    - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred -Dtest_output_directory="$TEST_OUTPUT_DIRECTORY"
+    - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
     - meson compile -C build
   artifacts:
     paths:
@@ -186,21 +183,11 @@ test:msvc-meson:
     - job: "build:msvc-meson"
       artifacts: true
   script:
-    - |
-      & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'
-  after_script:
-    - |
-      if ($env:CI_JOB_STATUS -ne "success") {
-        & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/print-test-failures.sh'
-        Move-Item -Path "$env:TEST_OUTPUT_DIRECTORY/failed-test-artifacts" -Destination t/
-      }
+    - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
   parallel: 10
   artifacts:
-    paths:
-      - t/failed-test-artifacts
     reports:
       junit: build/meson-logs/testlog.junit.xml
-    when: on_failure
 
 test:fuzz-smoke-tests:
   image: ubuntu:latest
index a6df927ba591f82772110b9b21ec3f769bf4df04..961c94fba0b2ee18210a3ee3eb8248e01af3fed2 100755 (executable)
@@ -9,5 +9,5 @@
 
 group "Run tests" \
        meson test -C "$1" --no-rebuild --print-errorlogs \
-               --test-args="$GIT_TEST_OPTS" --slice "$(($2))/$3" ||
+               --test-args="$GIT_TEST_OPTS" --slice "$((1+$2))/$3" ||
 handle_failed_tests
index ff948e397fcb70b77096b4fe7cafe71469935ec2..0444c79c023c8208984b5a54fda9acfe337fcff6 100755 (executable)
@@ -5,9 +5,9 @@
 
 . ${0%/*}/lib.sh
 
-TESTS=$(cd t && ./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh)
-
-group "Run tests" make --quiet -C t T="$(echo "$TESTS" | tr '\n' ' ')" ||
+group "Run tests" make --quiet -C t T="$(cd t &&
+       ./helper/test-tool path-utils slice-tests "$1" "$2" t[0-9]*.sh |
+       tr '\n' ' ')" ||
 handle_failed_tests
 
 # We only have one unit test at the moment, so run it in the first slice
index 874542ec3462a5c4396da05c764d8b409f737ac9..f5f33751da620dc73af1b9c6da0728c3d94415e6 100644 (file)
@@ -477,20 +477,14 @@ int cmd__path_utils(int argc, const char **argv)
 
        if (argc > 5 && !strcmp(argv[1], "slice-tests")) {
                int res = 0;
-               long slice, slices_total, i;
+               long offset, stride, i;
                struct string_list list = STRING_LIST_INIT_NODUP;
                struct stat st;
 
-               slices_total = strtol(argv[3], NULL, 10);
-               if (slices_total < 1)
-                       die("there must be at least one slice, got '%s'",
-                           argv[3]);
-
-               slice = strtol(argv[2], NULL, 10);
-               if (1 > slice || slice > slices_total)
-                       die("slice must be in the range 1 <= slice <= %ld, got '%s'",
-                           slices_total, argv[2]);
-
+               offset = strtol(argv[2], NULL, 10);
+               stride = strtol(argv[3], NULL, 10);
+               if (stride < 1)
+                       stride = 1;
                for (i = 4; i < argc; i++)
                        if (stat(argv[i], &st))
                                res = error_errno("Cannot stat '%s'", argv[i]);
@@ -498,7 +492,7 @@ int cmd__path_utils(int argc, const char **argv)
                                string_list_append(&list, argv[i])->util =
                                        (void *)(intptr_t)st.st_size;
                QSORT(list.items, list.nr, cmp_by_st_size);
-               for (i = slice - 1; i < list.nr; i+= slices_total)
+               for (i = offset; i < list.nr; i+= stride)
                        printf("%s\n", list.items[i].string);
 
                return !!res;