diff options
author | Jan Alexander Steffens (heftig) | 2024-04-09 15:03:42 +0300 |
---|---|---|
committer | Echo J | 2024-04-09 15:03:42 +0300 |
commit | c39573cbbbe7a2f9c78be88cbf39ddcdc649338f (patch) | |
tree | 2df1d56ca1d9b351c6372df029049c1f74a28879 /0002-Limit-unittests-workers.patch | |
parent | e9c6e0b2e58f499233424a85d589c7d54638d4b5 (diff) | |
download | aur-meson-rust.tar.gz |
Update to 1.4.0
This is a squashed version of b0a6e63fedf5c030ea7b169b2f67d6ac0b06df0a^..1ef55a5d5069da4825a249124766be8c9a9e696c commits
Diffstat (limited to '0002-Limit-unittests-workers.patch')
-rw-r--r-- | 0002-Limit-unittests-workers.patch | 40 |
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! |