aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown
diff options
context:
space:
mode:
authorStian Selnes <stian@pexip.com>2018-11-12 10:33:49 +0100
committerNirbheek Chauhan <nirbheek.chauhan@gmail.com>2018-11-12 16:23:59 +0530
commit0821462ce382541e120d8d6cfc1a3224a492b275 (patch)
tree67ca584e5f619ab6beabdc67c930f83ceb7df658 /docs/markdown
parent50b2ef7354b503ae62abd504cdce938c390b358f (diff)
downloadmeson-0821462ce382541e120d8d6cfc1a3224a492b275.zip
meson-0821462ce382541e120d8d6cfc1a3224a492b275.tar.gz
meson-0821462ce382541e120d8d6cfc1a3224a492b275.tar.bz2
Add kwarg is_default to add_test_setup()
is_default may be used to set the name of the test setup that will be used by default whenever the option --setup is not given. Fixes #4430
Diffstat (limited to 'docs/markdown')
-rw-r--r--docs/markdown/Reference-manual.md3
-rw-r--r--docs/markdown/snippets/test_setup_is_default.md14
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 72e9609..7df0717 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -105,6 +105,9 @@ the following:
- `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
+- `is_default` 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. Since 0.49.0
To use the test setup, run `meson test --setup=*name*` inside the build dir.
diff --git a/docs/markdown/snippets/test_setup_is_default.md b/docs/markdown/snippets/test_setup_is_default.md
new file mode 100644
index 0000000..2274dc9
--- /dev/null
+++ b/docs/markdown/snippets/test_setup_is_default.md
@@ -0,0 +1,14 @@
+## New keyword argument `is_default` to `add_test_setup()`
+
+The keyword argument `is_default` may be used to set whether the test
+setup should be used by default whenever `meson test` is run without
+the `--setup` option.
+
+```meson
+add_test_setup('default', is_default: true, env: 'G_SLICE=debug-blocks')
+add_test_setup('valgrind', env: 'G_SLICE=always-malloc', ...)
+test('mytest', exe)
+```
+
+For the example above, running `meson test` and `meson test
+--setup=default` is now equivalent.