summarylogtreecommitdiffstats
path: root/0002-Limit-unittests-workers.patch
diff options
context:
space:
mode:
Diffstat (limited to '0002-Limit-unittests-workers.patch')
-rw-r--r--0002-Limit-unittests-workers.patch40
1 files changed, 0 insertions, 40 deletions
diff --git a/0002-Limit-unittests-workers.patch b/0002-Limit-unittests-workers.patch
deleted file mode 100644
index a2510b442a42..000000000000
--- a/0002-Limit-unittests-workers.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jan Alexander Steffens (heftig)" <heftig@archlinux.org>
-Date: Mon, 12 Feb 2024 02:51:51 +0100
-Subject: [PATCH] Limit unittests workers
-
-On our new 48-core/96-thread build server, the
-`test_install_log_content` test fails, apparently because it runs in
-parallel with `test_install_subdir_symlinks`, which modifies the
-`59 install subdir` source directory.
----
- run_unittests.py | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/run_unittests.py b/run_unittests.py
-index 7a2502a6e886..f43497b5f5e2 100755
---- a/run_unittests.py
-+++ b/run_unittests.py
-@@ -22,6 +22,7 @@ import time
- import subprocess
- import os
- import unittest
-+import multiprocessing
-
- import mesonbuild.mlog
- import mesonbuild.depfile
-@@ -130,7 +131,13 @@ def main():
- # Don't use pytest-xdist when running single unit tests since it wastes
- # time spawning a lot of processes to distribute tests to in that case.
- if not running_single_tests(sys.argv, cases):
-- pytest_args += ['-n', 'auto']
-+ try:
-+ num_workers = multiprocessing.cpu_count()
-+ except Exception as e:
-+ num_workers = 2
-+ if num_workers > 64:
-+ num_workers = 64
-+ pytest_args += ['-n', str(num_workers)]
- except ImportError:
- print('pytest-xdist not found, tests will not be distributed across CPU cores')
- # Let there be colors!