-fragment_downloaded_cb({"url":"Unit-tests.html#other-test-options","fragment":"Other test options\nSometimes you need to run the tests multiple times, which is done like this:\nMeson will set the MESON_TEST_ITERATION environment variable to the\ncurrent iteration of the test (added 1.5.0).\nInvoking tests via a helper executable such as Valgrind can be done with the\n--wrap argument\nArguments to the wrapper binary can be given like this:\nMeson also supports running the tests under GDB. Just doing this:\nMeson will launch gdb all set up to run the test. Just type run in\nthe GDB command prompt to start the program.\nThe second use case is a test that segfaults only rarely. In this case\nyou can invoke the following command:\nThis runs the test up to 10 000 times under GDB automatically. If the\nprogram crashes, GDB will halt and the user can debug the application.\nNote that testing timeouts are disabled in this case so meson test\nwill not kill gdb while the developer is still debugging it. The\ndownside is that if the test binary freezes, the test runner will wait\nforever.\nSometimes, the GDB binary is not in the PATH variable or the user\nwants to use a GDB replacement. Therefore, the invoked GDB program can\nbe specified (added 0.52.0):\nMeson can print the error logs produced by failing tests via the\n--print-errorlogs option. The logs can include stack traces and environmental\nvariables. This is especially useful when you run the tests on GitHub, Travis,\nJenkins and the like:\nRunning tests interactively can be done with the --interactive option.\nmeson test --interactive invokes tests with stdout, stdin and stderr\nconnected directly to the calling terminal. This can be useful if your test is\nan integration test running in a container or virtual machine where a debug\nshell is spawned if it fails (added 1.5.0):\nBy default, the output from tests will be limited to the last 100 lines. The\nmaximum number of lines to show can be configured with the --max-lines option\n(added 1.5.0):\nTimeout\nIn the test case options, the timeout option is specified in a number of seconds.\nTo disable timeout in test cases, add timeout: 0 or a negative value to allow\ninfinite duration for the test case to complete.\nFor running tests, you can specify a command line argument for overriding the\ntimeout as well:\nFor further information see the command line help of Meson by running\nmeson test -h.\n"});
0 commit comments