[tracker/sam/tracker-2.3-developer-experience: 19/38] ci: Run a maximum of 4 tests simultaneously



commit 8cb90406efb542f56f58ef72c11f9c1d74828f80
Author: Sam Thursfield <sam afuera me uk>
Date:   Sat Sep 14 15:20:30 2019 +0200

    ci: Run a maximum of 4 tests simultaneously
    
    This is an attempt to deal with the random test failures that sometimes
    appear, e.g. https://gitlab.gnome.org/GNOME/tracker/-/jobs/432429
    
    The CI runners on gitlab.gnome.org report 32 CPU cores, so Meson tries
    to run 32 tests at a time. I guess because our tests are mostly IO
    bound this actually makes things slower and causes random failures.

 .gitlab-ci.yml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c8460576c..565d9a45f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -24,11 +24,12 @@ test-fedora-latest:
       # screenful of junk each time unless we strip these.
       unset $(env|grep -o '^CI_[^=]*')
 
-      su tracker -c 'cd build; meson test --print-errorlogs ${MESON_TEST_EXTRA_ARGS}'
+      # We limit `meson test` to 4 parallel test processes. The default is to
+      # have one test process per CPU, but our tests are mostly IO bound
+      # and we get timeouts and failures if we try to run 32 of them at once.
+      su tracker -c 'cd build; meson test --num-processes=4 --print-errorlogs ${MESON_TEST_EXTRA_ARGS}'
 
   after_script:
-    - |
-      python3 -c 'import multiprocessing; print(f"Meson probably started {multiprocessing.cpu_count()} tests 
in parallel.")'
     - |
       echo "Test suite settings:"
       echo


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]