diff options
| author | Paolo Bonzini <pbonzini@redhat.com> | 2024-11-20 08:58:10 +0100 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2024-12-19 09:25:20 -0800 |
| commit | 8b9846d9a9d29b427860891c9b699eb4305e348b (patch) | |
| tree | 16e602e2e56fc175177eab9c56a0cbf97d5cda33 /docs/markdown/Unit-tests.md | |
| parent | eb35d1a05f08f6969851cea81889e3beffdb9ec2 (diff) | |
| download | meson-8b9846d9a9d29b427860891c9b699eb4305e348b.tar.gz | |
mtest: move determine_worker_count to utils, generalize
It is useful to apply a limit to the number of processes even outside "meson test",
and specifically for clang tools. In preparation for this, generalize
determine_worker_count() to accept a variable MESON_NUM_PROCESSES instead of
MESON_TESTTHREADS, and use it throughout instead of multiprocessing.cpu_count().
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'docs/markdown/Unit-tests.md')
| -rw-r--r-- | docs/markdown/Unit-tests.md | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md index 898366095..13f6093f2 100644 --- a/docs/markdown/Unit-tests.md +++ b/docs/markdown/Unit-tests.md @@ -83,16 +83,18 @@ possible. By default Meson uses as many concurrent processes as there are cores on the test machine. You can override this with the environment -variable `MESON_TESTTHREADS` like this. +variable `MESON_TESTTHREADS` or, *since 1.7.0*, `MESON_NUM_PROCESSES`: ```console -$ MESON_TESTTHREADS=5 meson test +$ MESON_NUM_PROCESSES=5 meson test ``` -Setting `MESON_TESTTHREADS` to 0 enables the default behavior (core +Setting `MESON_NUM_PROCESSES` to 0 enables the default behavior (core count), whereas setting an invalid value results in setting the job count to 1. +If both environment variables are present, `MESON_NUM_PROCESSES` prevails. + ## Priorities *(added in version 0.52.0)* |
