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.
This commit is contained in:
@@ -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" \;
|
||||
|
||||
Reference in New Issue
Block a user