From 0821462ce382541e120d8d6cfc1a3224a492b275 Mon Sep 17 00:00:00 2001 From: Stian Selnes Date: Mon, 12 Nov 2018 10:33:49 +0100 Subject: 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 --- docs/markdown/snippets/test_setup_is_default.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/markdown/snippets/test_setup_is_default.md (limited to 'docs/markdown/snippets') 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. -- cgit v1.1