From 55cf399ff8b9c15300f26dd1a46045dda7d49f98 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 13 Aug 2020 21:35:31 +0530 Subject: mtest: Allow filtering tests by subproject You could always specify a list of tests to run by passing the names as arguments to `meson test`. If there were multiple tests with that name (in the same project or different subprojects), all of them would be run. Now you can: 1. Run all tests with the specified name from a specific subproject: `meson test subprojname:testname` 1. Run all tests defined in a specific subproject: `meson test subprojectname:` Also forbid ':' in test names. We already forbid this elsewhere, so should not be a big deal. --- docs/markdown/snippets/mtest_test_list_subprojects.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 docs/markdown/snippets/mtest_test_list_subprojects.md (limited to 'docs/markdown') diff --git a/docs/markdown/snippets/mtest_test_list_subprojects.md b/docs/markdown/snippets/mtest_test_list_subprojects.md new file mode 100644 index 0000000..a8dbf4c --- /dev/null +++ b/docs/markdown/snippets/mtest_test_list_subprojects.md @@ -0,0 +1,18 @@ +## `meson test` can now filter tests by subproject + +You could always specify a list of tests to run by passing the names as +arguments to `meson test`. If there were multiple tests with that name (in the +same project or different subprojects), all of them would be run. Now you can: + +1. Run all tests with the specified name from a specific subproject: `meson test subprojname:testname` +1. Run all tests defined in a specific subproject: `meson test subprojectname:` + +As before, these can all be specified multiple times and mixed: + +```sh +# Run: +# * All tests called 'name1' or 'name2' and +# * All tests called 'name3' in subproject 'bar' and +# * All tests in subproject 'foo' +$ meson test name1 name2 bar:name3 foo: +``` -- cgit v1.1