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

Re: [PATCH 8/8] ci: use Meson's new `--slice` option

From
Junio C Hamano <gitster@pobox.com>
Date
Jul 8, 2025, 00:16 UTC
Message-ID
<xmqqldozzge4.fsf@gitster.g>
In-Reply-To
<20250703-b4-pks-meson-cleanups-v1-8-2804c2932abe@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 17 quoted lines
> As executing our test suite is notoriously slow on Windows we use matrix
> jobs in our CI systems to slice up tests and run them via multiple jobs.
> On Meson this is done with a comparatively complex PowerShell invocation
> as Meson didn't yet have a native way to slice tests like this.
>
> I have upstreamed a new `--slice` option [1] that addresses this use
> case though, which has been merged and released with Meson 1.8. Both
> GitLab and GitHub CI have Meson 1.8.2 available by now, so let's update
> the jobs to use that new option.
>
> [1]: https://github.com/mesonbuild/meson/pull/14092
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---
>  .github/workflows/main.yml | 2 +-
>  .gitlab-ci.yml             | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
https://github.com/git/git/actions/runs/16129796573/job/45515034049#step:6:17
unfortunately ends like this:
Run meson test -C build --no-rebuild --print-errorlogs --slice 0/10
  meson test -C build --no-rebuild --print-errorlogs --slice 0/10
  shell: C:\Program Files\PowerShell\7\pwsh.EXE -command ". '{0}'"
  env:
    DEVELOPER: 1
usage: meson test [-h] [--maxfail MAXFAIL] [--repeat REPEAT] [--no-rebuild]
                  [--gdb] [--gdb-path GDB_PATH] [-i] [--list]
                  [--wrapper WRAPPER] [-C WD] [--suite SUITE] [--no-suite SUITE]
                  [--no-stdsplit] [--print-errorlogs] [--benchmark]
                  [--logbase LOGBASE] [-j NUM_PROCESSES] [-v] [-q]
                  [-t TIMEOUT_MULTIPLIER] [--setup SETUP]
                  [--test-args TEST_ARGS] [--max-lines MAX_LINES]
                  [--slice SLICE/NUM_SLICES]
                  [args ...]
meson test: error: argument --slice: SLICE is not a positive integer
Error: Process completed with exit code 1.
Show 26 quoted lines
> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
> index 7dbf9f7f123..f0f653bd853 100644
> --- a/.github/workflows/main.yml
> +++ b/.github/workflows/main.yml
> @@ -298,7 +298,7 @@ jobs:
>          path: build
>      - name: Test
>        shell: pwsh
> -      run: meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % 10 } | Where-Object Name -EQ ${{ matrix.nr }} | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group }
> +      run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10
>  
>    regular:
>      name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
> diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
> index bb6d5b976cd..af10ebb59a3 100644
> --- a/.gitlab-ci.yml
> +++ b/.gitlab-ci.yml
> @@ -178,7 +178,7 @@ test:msvc-meson:
>      - job: "build:msvc-meson"
>        artifacts: true
>    script:
> -    - meson test -C build --list | Select-Object -Skip 1 | Select-String .* | Group-Object -Property { $_.LineNumber % $Env:CI_NODE_TOTAL + 1 } | Where-Object Name -EQ $Env:CI_NODE_INDEX | ForEach-Object { meson test -C build --no-rebuild --print-errorlogs $_.Group; if (!$?) { exit $LASTEXITCODE } }
> +    - meson test -C build --no-rebuild --print-errorlogs --slice $Env:CI_NODE_INDEX/$Env:CI_NODE_TOTAL
>    parallel: 10
>  
>  test:fuzz-smoke-tests:
Previous: Patrick SteinhardtNext: Jeff King
Message 15 of 46 in “A handful of Meson cleanups and improvements”
  1. 0/8 A handful of Meson cleanups and improvementsPatrick Steinhardt, Jul 3, 2025
  2. 1/8 meson: stop discovering native version of PythonPatrick Steinhardt, Jul 3, 2025
  3. Justin ToblerJul 8, 2025
  4. Patrick SteinhardtJul 9, 2025
  5. 2/8 meson: stop printing 'https' option twice in our summariesPatrick Steinhardt, Jul 3, 2025
  6. 3/8 meson: improve summary of auto-detected featuresPatrick Steinhardt, Jul 3, 2025
  7. Justin ToblerJul 8, 2025
  8. 4/8 meson: clean up unnecessary variablesPatrick Steinhardt, Jul 3, 2025
  9. 5/8 meson: fix lookup of shell on MINGW64Patrick Steinhardt, Jul 3, 2025
  10. 6/8 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=Patrick Steinhardt, Jul 3, 2025
  11. Ramsay JonesJul 3, 2025
  12. Patrick SteinhardtJul 8, 2025
  13. 7/8 meson: update subproject wrappersPatrick Steinhardt, Jul 3, 2025
  14. 8/8 ci: use Meson's new `--slice` optionPatrick Steinhardt, Jul 3, 2025
  15. Junio C HamanoJul 8, 2025
  16. Jeff KingJul 8, 2025
  17. Jeff KingJul 8, 2025
  18. Junio C HamanoJul 8, 2025
  19. Patrick SteinhardtJul 8, 2025
  20. 0/8 A handful of Meson cleanups and improvementsPatrick Steinhardt, Jul 8, 2025
  21. 1/8 meson: stop discovering native version of PythonPatrick Steinhardt, Jul 8, 2025
  22. 2/8 meson: stop printing 'https' option twice in our summariesPatrick Steinhardt, Jul 8, 2025
  23. 3/8 meson: improve summary of auto-detected featuresPatrick Steinhardt, Jul 8, 2025
  24. 4/8 meson: clean up unnecessary variablesPatrick Steinhardt, Jul 8, 2025
  25. 5/8 meson: fix lookup of shell on MINGW64Patrick Steinhardt, Jul 8, 2025
  26. Justin ToblerJul 8, 2025
  27. 6/8 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=Patrick Steinhardt, Jul 8, 2025
  28. 7/8 meson: update subproject wrappersPatrick Steinhardt, Jul 8, 2025
  29. 8/8 ci: use Meson's new `--slice` optionPatrick Steinhardt, Jul 8, 2025
  30. 0/8 A handful of Meson cleanups and improvementsPatrick Steinhardt, Jul 9, 2025
  31. 1/8 meson: stop discovering native version of PythonPatrick Steinhardt, Jul 9, 2025
  32. Junio C HamanoJul 9, 2025
  33. Justin ToblerJul 9, 2025
  34. Eli SchwartzJul 9, 2025
  35. Junio C HamanoJul 9, 2025
  36. 2/8 meson: stop printing 'https' option twice in our summariesPatrick Steinhardt, Jul 9, 2025
  37. Junio C HamanoJul 9, 2025
  38. 3/8 meson: improve summary of auto-detected featuresPatrick Steinhardt, Jul 9, 2025
  39. Toon ClaesJul 10, 2025
  40. Junio C HamanoJul 10, 2025
  41. 4/8 meson: clean up unnecessary variablesPatrick Steinhardt, Jul 9, 2025
  42. 5/8 meson: fix lookup of shell on MINGW64Patrick Steinhardt, Jul 9, 2025
  43. 6/8 meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir=Patrick Steinhardt, Jul 9, 2025
  44. 7/8 meson: update subproject wrappersPatrick Steinhardt, Jul 9, 2025
  45. 8/8 ci: use Meson's new `--slice` optionPatrick Steinhardt, Jul 9, 2025
  46. Justin ToblerJul 9, 2025

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.