Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PoC: Allow parallel 'make test' (was: Re: PATCHv2: Allow parallel make)
Daniel Shahaf wrote on Tue, 22 Sep 2026 00:50 +00:00:
> Timings:
>
> make -C zsh test 63.19s user 14.19s system 55% cpu 2:18.63 total
> make -C zsh test 67.71s user 20.41s system 161% cpu 54.494 total
Furthermore, with MAX_CPUS set to the number of *.ztst files:
+MAX_CPUS=$(function () { print $# } ${ZTST_root_of_source_tree}/Test/*.ztst)
make -C zsh test 77.79s user 25.82s system 484% cpu 21.366 total
This sidesteps the batching behaviour of zargs:
> > # Because of "wait" limitations, --max-procs spawns max-procs jobs, then
> > # waits for all of those, then spawns another batch, etc.
> @@ -36,8 +164,28 @@ for file in "${(f)ZTST_testlist}"; do
> + zargs \
> + --no-run-if-empty \
> + -n1 \
> + --max-procs "${MAX_CPUS}" \
Aside: The usage message of zargs implies that --max-procs="${MAX_CPUS}"
should work, but in fact it doesn't work as «--foo=bar», only as «--foo bar».
Also, zargs evaluates $wait but never sets it.
> + "${(f)ZTST_testlist}" \
> + -- run_one_file
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author