From c7c2bc8db111a5be277aeb14aecfe0d28ab286a9 Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 2 Feb 2021 09:27:16 +0100 Subject: interpreter, mtest: introduce add_test_setup(exclude_suites: ...) This new keyword argument makes it possible to run specific test setups only on a subset of the tests. For example, to mark some tests as slow and avoid running them by default: add_test_setup('quick', exclude_suites: ['slow'], is_default: true) add_test_setup('slow') It will then be possible to run the slow tests with either `meson test --setup slow` or `meson test --suite slow`. --- test cases/unit/2 testsetups/meson.build | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test cases') diff --git a/test cases/unit/2 testsetups/meson.build b/test cases/unit/2 testsetups/meson.build index 83438569a..1e8f0184f 100644 --- a/test cases/unit/2 testsetups/meson.build +++ b/test cases/unit/2 testsetups/meson.build @@ -12,7 +12,7 @@ add_test_setup('valgrind', env : env) buggy = executable('buggy', 'buggy.c', 'impl.c') -test('Test buggy', buggy) +test('Test buggy', buggy, suite: ['buggy']) envcheck = find_program('envcheck.py') test('test-env', envcheck) @@ -23,3 +23,4 @@ add_test_setup('onlyenv2', env : 'TEST_ENV=1') add_test_setup('onlyenv3', env : ['TEST_ENV=1']) add_test_setup('wrapper', exe_wrapper : [vg, '--error-exitcode=1']) add_test_setup('timeout', timeout_multiplier : 20) +add_test_setup('good', exclude_suites : 'buggy') -- cgit v1.3