summaryrefslogtreecommitdiff
path: root/docs/markdown/Unit-tests.md
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-02-27 08:21:13 +0100
committerEli Schwartz <eschwartz93@gmail.com>2025-02-27 15:25:05 -0500
commitd3c863997513be81c0c52ef209a57360b771d9e1 (patch)
tree65e5dde55954ea3645004d9b597d04d93b10bff7 /docs/markdown/Unit-tests.md
parent1412abc516e56b7d90f36fc75acb3e4b8c294e30 (diff)
downloadmeson-d3c863997513be81c0c52ef209a57360b771d9e1.tar.gz
mtest: add option to slice tests
Executing tests can take a very long time. As an example, the Git test suite on Windows takes around 4 hours to execute. The Git project has been working around the issue by splitting up CI jobs into multiple slices: one job creates the build artifacts, and then we spawn N test jobs with those artifacts, where each test job executes 1/Nth of the tests. This can be scripted rather easily by using `meson test --list`, selecting every Nth line, but there may be other projects that have a similar need. Wire up a new option "--slice i/n" to `meson test` that does implements this logic. Signed-off-by: Patrick Steinhardt <ps@pks.im>
Diffstat (limited to 'docs/markdown/Unit-tests.md')
-rw-r--r--docs/markdown/Unit-tests.md5
1 files changed, 5 insertions, 0 deletions
diff --git a/docs/markdown/Unit-tests.md b/docs/markdown/Unit-tests.md
index 13f6093f2..5a7b19940 100644
--- a/docs/markdown/Unit-tests.md
+++ b/docs/markdown/Unit-tests.md
@@ -206,6 +206,11 @@ name(s), the test name(s) must be contained in the suite(s). This
however is redundant-- it would be more useful to specify either
specific test names or suite(s).
+Since version *1.8.0*, you can pass `--slice i/n` to split up the set of tests
+into `n` slices and execute the `ith` such slice. This allows you to distribute
+a set of long-running tests across multiple machines to decrease the overall
+runtime of tests.
+
### Other test options
Sometimes you need to run the tests multiple times, which is done like this: