From 07b3e8785cce34865246da714ad64896db81b5c0 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Wed, 21 Aug 2024 19:24:10 +0200 Subject: [PATCH] CI: Limit maximum number of test processes to 32 There are spurious failures happening in CI runs and I blame those on too many processes running at the same time overloading either the compositor we're running against, or causing OOM situations or just genereally slowing things down and hitting timeout limits. The choice of 32 is rather arbitrary. I just picked a number that felt good. --- .gitlab-ci.yml | 1 + .gitlab-ci/run-tests.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fee746d85c..1b647f4507 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -26,6 +26,7 @@ variables: BACKEND_FLAGS: "-Dx11-backend=true -Dwayland-backend=true -Dbroadway-backend=true" FEATURE_FLAGS: "-Dvulkan=enabled -Dcloudproviders=enabled -Dbuild-testsuite=true -Dintrospection=enabled" MESON_TEST_TIMEOUT_MULTIPLIER: 3 + MESON_TEST_MAX_PROCESSES: 32 FEDORA_IMAGE: "registry.gitlab.gnome.org/gnome/gtk/fedora:v52" workflow: diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh index 247443fe9e..0996e07bdd 100755 --- a/.gitlab-ci/run-tests.sh +++ b/.gitlab-ci/run-tests.sh @@ -8,6 +8,7 @@ builddir=$1 setup=$2 suite=$3 multiplier=${MESON_TEST_TIMEOUT_MULTIPLIER:-1} +n_processes=${MESON_TEST_MAX_PROCESSES:-1} # Ignore memory leaks lower in dependencies export LSAN_OPTIONS=suppressions=$srcdir/lsan.supp:print_suppressions=0:detect_leaks=0:allocator_may_return_null=1 @@ -18,6 +19,7 @@ case "${setup}" in meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ + --num-processes "${n_processes}" \ --print-errorlogs \ --setup=${setup} \ --suite=${suite//,/ --suite=} \ @@ -42,6 +44,7 @@ case "${setup}" in meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ + --num-processes "${n_processes}" \ --print-errorlogs \ --setup=${setup} \ --suite=${suite//,/ --suite=} \ @@ -65,6 +68,7 @@ case "${setup}" in meson test -C ${builddir} \ --quiet \ --timeout-multiplier "${multiplier}" \ + --num-processes "${n_processes}" \ --print-errorlogs \ --setup=${setup} \ --suite=${suite//,/ --suite=} \