gitlab-ci: handle failed tests on MSVC+Meson job
The MSVC+Meson job does not currently have any logic to print failing tests, nor does it upload the failed test artifacts. Backfill this logic to make help debugging efforts in case any of its jobs has failed. GitHub already knows to do this, so we don't need an equivalent change over there. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Patrick Steinhardt committed
Feb 19, 2026 at 07:25 UTC
51338373928f47bfce2c345c97e753be67622ab6
1 file changed
+13
-1
.gitlab-ci.yml
+13
-1
@@ -157,6 +157,8 @@ test:mingw64:
157
parallel: 10
158
159
.msvc-meson:
160
+ variables:
161
+ TEST_OUTPUT_DIRECTORY: "C:/Git-Test"
162
tags:
163
- saas-windows-medium-amd64
164
before_script:
@@ -164,12 +166,13 @@ test:mingw64:
166
- choco install -y git meson ninja rust-ms
167
- Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
168
- refreshenv
169
+ - New-Item -Path $env:TEST_OUTPUT_DIRECTORY -ItemType Directory
170
171
build:msvc-meson:
172
extends: .msvc-meson
173
stage: build
174
script:
172
- - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
175
+ - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred -Dtest_output_directory="$TEST_OUTPUT_DIRECTORY"
176
- meson compile -C build
177
artifacts:
178
paths:
@@ -185,10 +188,19 @@ test:msvc-meson:
188
script:
189
- |
190
& "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/run-test-slice-meson.sh build $CI_NODE_INDEX $CI_NODE_TOTAL'
191
+ after_script:
192
+ - |
193
+ if ($env:CI_JOB_STATUS -ne "success") {
194
+ & "C:/Program Files/Git/usr/bin/bash.exe" -l -c 'ci/print-test-failures.sh'
195
+ Move-Item -Path "$env:TEST_OUTPUT_DIRECTORY/failed-test-artifacts" -Destination t/
196
+ }
197
parallel: 10
198
artifacts:
199
+ paths:
200
+ - t/failed-test-artifacts
201
reports:
202
junit: build/meson-logs/testlog.junit.xml
203
+ when: on_failure
204
205
test:fuzz-smoke-tests:
206
image: ubuntu:latest