diff --git a/README.md b/README.md index 32625517..1172a161 100644 --- a/README.md +++ b/README.md @@ -167,6 +167,8 @@ commas or semicolons. - `VKD3D_TEST_FILTER` - a filter string. Only the tests whose names matches the filter string will be run, e.g. `VKD3D_TEST_FILTER=clear_render_target`. Useful for debugging or developing new tests. + - `VKD3D_TEST_EXCLUDE` - excludes tests of which the name is included in the string, + e.g. `VKD3D_TEST_EXCLUDE=test_root_signature_priority,test_conservative_rasterization_dxil`. - `VKD3D_TEST_PLATFORM` - can be set to "wine", "windows" or "other". The test platform controls the behavior of todo(), todo_if(), bug_if() and broken() conditions in tests. diff --git a/include/private/vkd3d_test.h b/include/private/vkd3d_test.h index 59fcb0d2..1c53e79c 100644 --- a/include/private/vkd3d_test.h +++ b/include/private/vkd3d_test.h @@ -20,6 +20,7 @@ #define __VKD3D_TEST_H #include "vkd3d_common.h" +#include "vkd3d_debug.h" #include #include #include @@ -119,6 +120,7 @@ static struct bool bug_enabled; const char *test_name_filter; + const char *test_exclude_list; char context[1024]; } vkd3d_test_state; @@ -266,6 +268,7 @@ vkd3d_test_debug(const char *fmt, ...) int main(int argc, char **argv) { + const char *exclude_list = getenv("VKD3D_TEST_EXCLUDE"); const char *test_filter = getenv("VKD3D_TEST_FILTER"); const char *debug_level = getenv("VKD3D_TEST_DEBUG"); char *test_platform = getenv("VKD3D_TEST_PLATFORM"); @@ -275,6 +278,7 @@ int main(int argc, char **argv) vkd3d_test_state.debug_level = debug_level ? atoi(debug_level) : 1; vkd3d_test_state.bug_enabled = bug ? atoi(bug) : true; vkd3d_test_state.test_name_filter = test_filter; + vkd3d_test_state.test_exclude_list = exclude_list; if (test_platform) { @@ -359,6 +363,10 @@ static inline void vkd3d_run_test(const char *name, vkd3d_test_pfn test_pfn) if (vkd3d_test_state.test_name_filter && !strstr(name, vkd3d_test_state.test_name_filter)) return; + if (vkd3d_test_state.test_exclude_list + && vkd3d_debug_list_has_member(vkd3d_test_state.test_exclude_list, name)) + return; + vkd3d_test_debug("%s", name); test_pfn(); }