Re: [PATCH 8/8] ci: use Meson's new `--slice` option
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jul 8, 2025, 04:39 UTC
- Message-ID
- <xmqqfrf7z471.fsf@gitster.g>
- In-Reply-To
- <20250708013935.GA549322@coredump.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 16 quoted lines
> That does renumber the job titles. Probably not important, but they
> wouldn't match the non-meson ones anymore (though I am not sure if we
> even slice in the same way, so maybe it does not matter at all).
>
> Anyway, the more minimal fix is:
>
> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
> index 673b1c44b9..7739bd2d76 100644
> --- a/.github/workflows/main.yml
> +++ b/.github/workflows/main.yml
> @@ -306,7 +306,7 @@ jobs:
> path: build
> - name: Test
> shell: pwsh
> - run: meson test -C build --no-rebuild --print-errorlogs --slice ${{ matrix.nr }}/10
> + run: meson test -C build --no-rebuild --print-errorlogs --slice "$(1+${{ matrix.nr }})/10"It is confusing that $(...) is not a command substitution in shell but somehow performs arithmetic X-<.
Show 13 quoted lines
> regular:
> name: ${{matrix.vector.jobname}} (${{matrix.vector.pool}})
>
> with the additional bonus that I can put "PowerShell Hacker" on my
> resume now.
>
> Curiously the quotes around the whole thing are required. If you do
> just:
>
> $(1+1)/10
>
> you will get two arguments: "2" and "/10". Definitely surprising to me
> coming from a bourne shell background.True.