diff options
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Reference-manual.md | 7 | ||||
-rw-r--r-- | docs/markdown/snippets/test_timeout.md | 9 |
2 files changed, 14 insertions, 2 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index cb8347a..4a1e759 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -119,7 +119,9 @@ the following: environment juggling. *(since 0.52.0)* A dictionary is also accepted. - `exe_wrapper`: a list containing the wrapper command or script followed by the arguments to it - `gdb`: if `true`, the tests are also run under `gdb` -- `timeout_multiplier`: a number to multiply the test timeout with +- `timeout_multiplier`: a number to multiply the test timeout with. + *Since 0.57* if timeout_multiplier is `<= 0` the test has infinite duration, + in previous versions of Meson the test would fail with a timeout immediately. - `is_default` *(since 0.49.0)*: a bool to set whether this is the default test setup. If `true`, the setup will be used whenever `meson test` is run without the `--setup` option. @@ -1730,7 +1732,8 @@ test(..., env: nomalloc, ...) - `timeout`: the amount of seconds the test is allowed to run, a test that exceeds its time limit is always considered failed, defaults to - 30 seconds + 30 seconds. *Since 0.57* if timeout is `<= 0` the test has infinite duration, + in previous versions of Meson the test would fail with a timeout immediately. - `workdir`: absolute path that will be used as the working directory for the test diff --git a/docs/markdown/snippets/test_timeout.md b/docs/markdown/snippets/test_timeout.md new file mode 100644 index 0000000..e436d2e --- /dev/null +++ b/docs/markdown/snippets/test_timeout.md @@ -0,0 +1,9 @@ +## `test()` timeout and timeout_multiplier value <= 0 + +`test(..., timeout: 0)`, or negative value, used to abort the test immediately +but now instead allow infinite duration. Note that omitting the `timeout` +keyword argument still defaults to 30s timeout. + +Likewise, `add_test_setup(..., timeout_multiplier: 0)`, or +`meson test --timeout-multiplier 0`, or negative value, disable tests timeout. + |