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

Re: [PATCH 5/5] gitlab-ci: handle failed tests on MSVC+Meson job

From
Justin Tobler <jltobler@gmail.com>
Date
Feb 9, 2026, 18:33 UTC
Message-ID
<aYolvOd4erKFhSUE@denethor>
In-Reply-To
<20260209-b4-pks-ci-meson-improvements-v1-5-38444dec4874@pks.im>
On 26/02/09 05:56PM, Patrick Steinhardt wrote:
Show 30 quoted lines
> 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>
> ---
>  .gitlab-ci.yml | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index 04857b479d..71b8a6e642 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -157,6 +157,8 @@ test:mingw64:
>    parallel: 10
>  
>  .msvc-meson:
> +  variables:
> +    TEST_OUTPUT_DIRECTORY: "C:/Git-Test"
>    tags:
>      - saas-windows-medium-amd64
>    before_script:
> @@ -164,12 +166,13 @@ 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
Before the script starts we create the test output directory.
Show 6 quoted lines
>  build:msvc-meson:
>    extends: .msvc-meson
>    stage: build
>    script:
> -    - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred
> +    - meson setup build --vsenv -Dperl=disabled -Dbackend_max_links=1 -Dcredential_helpers=wincred -Dtest_output_directory="$TEST_OUTPUT_DIRECTORY"
Now we set the test output directory build option accordingly.
Show 13 quoted lines
>      - meson compile -C build
>    artifacts:
>      paths:
> @@ -185,10 +188,19 @@ 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'
> +  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/
> +      }

Here we print any failures and move them so they are stored as a CI artifact.

Show 7 quoted lines
>    parallel: 10
>    artifacts:
> +    paths:
> +      - t/failed-test-artifacts
>      reports:
>        junit: build/meson-logs/testlog.junit.xml
> +    when: on_failure
This patch also looks good.
-Justin
Previous: Patrick Steinhardt
Message 13 of 13 in “Some assorted fixes for GitLab CI”
  1. 0/5 Some assorted fixes for GitLab CIPatrick Steinhardt, Feb 9, 2026
  2. 1/5 ci: handle failures of test-slice helperPatrick Steinhardt, Feb 9, 2026
  3. 2/5 ci: don't skip smallest test slice in GitLabPatrick Steinhardt, Feb 9, 2026
  4. Justin ToblerFeb 9, 2026
  5. 3/5 ci: make test slicing consistent across Meson/MakePatrick Steinhardt, Feb 9, 2026
  6. Justin ToblerFeb 9, 2026
  7. Patrick SteinhardtFeb 10, 2026
  8. Junio C HamanoFeb 10, 2026
  9. Jeff KingFeb 10, 2026
  10. Patrick SteinhardtFeb 11, 2026
  11. 4/5 gitlab-ci: use "run-test-slice-meson.sh"Patrick Steinhardt, Feb 9, 2026
  12. 5/5 gitlab-ci: handle failed tests on MSVC+Meson jobPatrick Steinhardt, Feb 9, 2026
  13. Justin ToblerFeb 9, 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.