From f33cf3c09ed6c4345ca13f46df17012fda9d46c4 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 19 Mar 2026 09:10:11 +0100 Subject: [PATCH] meson.setupHook: fix enableParallelChecking Previously, this controlled the parallelism of building the tests. The tests were then always run in parallel. Fix so enableParallelBuilding controls building, and enableParallelChecking controls the test run. Fixes: bb73d9a0ceb2 ("meson: support enableParallelChecking") --- pkgs/by-name/me/meson/setup-hook.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/me/meson/setup-hook.sh b/pkgs/by-name/me/meson/setup-hook.sh index a9feb15eedd3..4eac58193142 100644 --- a/pkgs/by-name/me/meson/setup-hook.sh +++ b/pkgs/by-name/me/meson/setup-hook.sh @@ -63,16 +63,22 @@ mesonCheckPhase() { flagsArray+=("--timeout-multiplier=0") fi - # Parallel checking is enabled by default. + # Parallel building is enabled by default. local buildCores=1 - if [ "${enableParallelChecking-1}" ]; then + if [ "${enableParallelBuilding-1}" ]; then buildCores="$NIX_BUILD_CORES" fi TERM=dumb ninja -j"$buildCores" $ninjaFlags "${ninjaFlagsArray[@]}" meson-test-prereq + # Parallel checking is enabled by default. + local testCores=1 + if [ "${enableParallelChecking-1}" ]; then + testCores="$NIX_BUILD_CORES" + fi + echoCmd 'mesonCheckPhase flags' "${flagsArray[@]}" - meson test --no-rebuild --print-errorlogs --max-lines=1000000 "${flagsArray[@]}" + meson test -j"$testCores" --no-rebuild --print-errorlogs --max-lines=1000000 "${flagsArray[@]}" runHook postCheck }