add_test_setup()
Add a custom test setup. This setup can be used to run the tests with a custom setup, for example under Valgrind.
To use the test setup, run meson test --setup=*name* inside the
build dir.
Note that all these options are also available while running the
meson test script for running tests instead of ninja test or
msbuild RUN_TESTS.vcxproj, etc depending on the backend.
Signature
# Add a custom test setup
void add_test_setup(
str name, # The name of the test setup
# Keyword arguments:
env : env | array[str] | dict[str] # environment variables to set
exclude_suites : array[str] # An array of test suites that should be excluded when using this setup
exe_wrapper : array[str | external_program] # The command or script followed by the arguments to it
gdb : bool # If `true`, the tests are also run under `gdb`
is_default : bool # Set whether this is the default test setup
timeout_multiplier : int # A number to multiply the test timeout with
)
Arguments
The function add_test_setup() accepts the following positional arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
name |
str |
The name of the test setup |
|
Finally, add_test_setup()
accepts the following keyword arguments:
| Name | Type | Description | Tags |
|---|---|---|---|
env |
env | array[str] | dict[str] |
environment variables to set
, such as |
|
exclude_suites |
array[str] |
An array of test suites that should be excluded when using this setup. Suites specified in the |
(since 0.57.0) |
exe_wrapper |
array[str | external_program] |
The command or script followed by the arguments to it |
|
gdb |
bool |
If |
|
is_default |
bool |
Set whether this is the default test setup.
If |
(since 0.49.0)
|
timeout_multiplier |
int |
A number to multiply the test timeout with.
Since 0.57 if timeout_multiplier is |
|
The results of the search are