Tests: Teach RunCMake_TEST_FILTER to account for test variant description

This commit is contained in:
Brad King
2023-04-05 07:56:25 -04:00
parent 2c59598b91
commit 1c8d4b4bf1

View File

@@ -11,8 +11,12 @@ foreach(
endforeach()
function(run_cmake test)
if(DEFINED ENV{RunCMake_TEST_FILTER} AND NOT test MATCHES "$ENV{RunCMake_TEST_FILTER}")
return()
if(DEFINED ENV{RunCMake_TEST_FILTER})
set(test_and_variant "${test}${RunCMake_TEST_VARIANT_DESCRIPTION}")
if(NOT test_and_variant MATCHES "$ENV{RunCMake_TEST_FILTER}")
return()
endif()
unset(test_and_variant)
endif()
set(top_src "${RunCMake_SOURCE_DIR}")