Downstream we sometimes end up with machines with lots of CPUs which
leads to running out of memory when trying to run the tests in VMs.
So let's switch to a different heuristic when we have lots of CPUs to
avoid running out of memory.
export TEST_NO_QEMU=1
fi
+NPROC=$(nproc)
+if [[ $NPROC -ge 10 ]]; then
+ NPROC=$((NPROC / 2))
+else
+ NPROC=$((NPROC - 1))
+fi
+
# Create missing mountpoint for mkosi sandbox.
mkdir -p /etc/pacman.d/gnupg
--suite integration-tests \
--print-errorlogs \
--no-stdsplit \
- --num-processes "$(($(nproc) - 1))"
+ --num-processes "$NPROC"
popd