From: Daan De Meyer Date: Fri, 10 Jan 2025 14:26:54 +0000 (+0100) Subject: fmf: Use different heuristic on beefy systems X-Git-Tag: v258-rc1~1640^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53546c71fe0a1b30ee296df84bb8c3577f5675a4;p=thirdparty%2Fsystemd.git fmf: Use different heuristic on beefy systems If we save journals in /tmp, we can run a larger number of tests in parallel so let's make use of the larger number of CPUs if the tests run on a beefy machine. --- diff --git a/test/fmf/integration-tests/test.sh b/test/fmf/integration-tests/test.sh index 34bf1abfa89..06a98bfd7a0 100755 --- a/test/fmf/integration-tests/test.sh +++ b/test/fmf/integration-tests/test.sh @@ -116,6 +116,14 @@ if [[ ! -e /dev/kvm ]]; then export TEST_NO_QEMU=1 fi +NPROC="$(nproc)" +if [[ "$NPROC" -ge 10 ]]; then + export TEST_JOURNAL_USE_TMP=1 + NPROC="$((NPROC / 3))" +else + NPROC="$((NPROC - 1))" +fi + # Create missing mountpoint for mkosi sandbox. mkdir -p /etc/pacman.d/gnupg @@ -131,7 +139,7 @@ mkosi -f sandbox \ --suite integration-tests \ --print-errorlogs \ --no-stdsplit \ - --num-processes "$(($(nproc) - 1))" && EC=0 || EC=$? + --num-processes "$NPROC" && EC=0 || EC=$? find build/meson-logs -type f -exec mv {} "$TMT_TEST_DATA" \; find build/test/journal -type f -exec mv {} "$TMT_TEST_DATA" \;