git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org,  Ramsay Jones <ramsay@ramsayjones.plus.com>,
	irecca.kun@gmail.com,  Eli Schwartz <eschwartz@gentoo.org>
Subject: Re: [PATCH 8/8] ci: use Meson's new `--slice` option
Date: Mon, 07 Jul 2025 17:16:03 -0700	[thread overview]
Message-ID: <xmqqldozzge4.fsf@gitster.g> (raw)
In-Reply-To: <20250703-b4-pks-meson-cleanups-v1-8-2804c2932abe@pks.im> (Patrick Steinhardt's message of "Thu, 03 Jul 2025 11:28:50 +0200")

Patrick Steinhardt <ps@pks.im> writes:

> 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.


> 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:

  reply	other threads:[~2025-07-08  0:16 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-03  9:28 [PATCH 0/8] A handful of Meson cleanups and improvements Patrick Steinhardt
2025-07-03  9:28 ` [PATCH 1/8] meson: stop discovering native version of Python Patrick Steinhardt
2025-07-08 19:38   ` Justin Tobler
2025-07-09  6:16     ` Patrick Steinhardt
2025-07-03  9:28 ` [PATCH 2/8] meson: stop printing 'https' option twice in our summaries Patrick Steinhardt
2025-07-03  9:28 ` [PATCH 3/8] meson: improve summary of auto-detected features Patrick Steinhardt
2025-07-08 19:56   ` Justin Tobler
2025-07-03  9:28 ` [PATCH 4/8] meson: clean up unnecessary variables Patrick Steinhardt
2025-07-03  9:28 ` [PATCH 5/8] meson: fix lookup of shell on MINGW64 Patrick Steinhardt
2025-07-03  9:28 ` [PATCH 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir= Patrick Steinhardt
2025-07-03 16:39   ` Ramsay Jones
2025-07-08  8:44     ` Patrick Steinhardt
2025-07-03  9:28 ` [PATCH 7/8] meson: update subproject wrappers Patrick Steinhardt
2025-07-03  9:28 ` [PATCH 8/8] ci: use Meson's new `--slice` option Patrick Steinhardt
2025-07-08  0:16   ` Junio C Hamano [this message]
2025-07-08  1:12     ` Jeff King
2025-07-08  1:39       ` Jeff King
2025-07-08  4:39         ` Junio C Hamano
2025-07-08  7:16         ` Patrick Steinhardt
2025-07-08  7:57 ` [PATCH v2 0/8] A handful of Meson cleanups and improvements Patrick Steinhardt
2025-07-08  7:57   ` [PATCH v2 1/8] meson: stop discovering native version of Python Patrick Steinhardt
2025-07-08  7:57   ` [PATCH v2 2/8] meson: stop printing 'https' option twice in our summaries Patrick Steinhardt
2025-07-08  7:57   ` [PATCH v2 3/8] meson: improve summary of auto-detected features Patrick Steinhardt
2025-07-08  7:57   ` [PATCH v2 4/8] meson: clean up unnecessary variables Patrick Steinhardt
2025-07-08  7:57   ` [PATCH v2 5/8] meson: fix lookup of shell on MINGW64 Patrick Steinhardt
2025-07-08 20:44     ` Justin Tobler
2025-07-08  7:57   ` [PATCH v2 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir= Patrick Steinhardt
2025-07-08  7:57   ` [PATCH v2 7/8] meson: update subproject wrappers Patrick Steinhardt
2025-07-08  7:57   ` [PATCH v2 8/8] ci: use Meson's new `--slice` option Patrick Steinhardt
2025-07-09  6:23 ` [PATCH v3 0/8] A handful of Meson cleanups and improvements Patrick Steinhardt
2025-07-09  6:23   ` [PATCH v3 1/8] meson: stop discovering native version of Python Patrick Steinhardt
2025-07-09 15:09     ` Junio C Hamano
2025-07-09 21:36       ` Justin Tobler
2025-07-09 22:22       ` Eli Schwartz
2025-07-09 22:40         ` Junio C Hamano
2025-07-09  6:23   ` [PATCH v3 2/8] meson: stop printing 'https' option twice in our summaries Patrick Steinhardt
2025-07-09 15:17     ` Junio C Hamano
2025-07-09  6:23   ` [PATCH v3 3/8] meson: improve summary of auto-detected features Patrick Steinhardt
2025-07-10 15:25     ` Toon Claes
2025-07-10 16:24       ` Junio C Hamano
2025-07-09  6:23   ` [PATCH v3 4/8] meson: clean up unnecessary variables Patrick Steinhardt
2025-07-09  6:23   ` [PATCH v3 5/8] meson: fix lookup of shell on MINGW64 Patrick Steinhardt
2025-07-09  6:23   ` [PATCH v3 6/8] meson: fix GIT_EXEC_PATH with overridden -Dlibexecdir= Patrick Steinhardt
2025-07-09  6:23   ` [PATCH v3 7/8] meson: update subproject wrappers Patrick Steinhardt
2025-07-09  6:23   ` [PATCH v3 8/8] ci: use Meson's new `--slice` option Patrick Steinhardt
2025-07-09 21:37   ` [PATCH v3 0/8] A handful of Meson cleanups and improvements Justin Tobler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqldozzge4.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=eschwartz@gentoo.org \
    --cc=git@vger.kernel.org \
    --cc=irecca.kun@gmail.com \
    --cc=ps@pks.im \
    --cc=ramsay@ramsayjones.plus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).