From 00db01ddcd0b06f0cf5ddc43c19aa239d769c53f Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 19 Jan 2026 15:47:58 -0500 Subject: Tests: Fix RunCMake.include_external_msproject .sln check failure Accumulate failures instead of only considering the last case. --- .../include_external_msproject/check_utils.cmake | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/Tests/RunCMake/include_external_msproject/check_utils.cmake b/Tests/RunCMake/include_external_msproject/check_utils.cmake index 0162519..4b9658a 100644 --- a/Tests/RunCMake/include_external_msproject/check_utils.cmake +++ b/Tests/RunCMake/include_external_msproject/check_utils.cmake @@ -90,8 +90,6 @@ endfunction() # RunCMake test check helper function(check_project test name guid type platform imported_release_config_name) set(sln "${RunCMake_TEST_BINARY_DIR}/${test}.sln") - set(sep "") - set(failed "") if(NOT type) set(type 8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942) endif() @@ -112,27 +110,23 @@ function(check_project test name guid type platform imported_release_config_name if(guid) check_project_guid("${sln}" "${name}" "${guid}" passed_guid) if(NOT passed_guid) - string(APPEND failed "${sep}${name} solution has no project with expected GUID=${guid}") - set(sep "\n") + string(APPEND RunCMake_TEST_FAILED "${name} solution has no project with expected GUID=${guid}\n") endif() else() set(passed_guid 1) endif() check_project_type("${sln}" "${name}" "${type}" passed_type) if(NOT passed_type) - string(APPEND failed "${sep}${name} solution has no project with expected TYPE=${type}") - set(sep "\n") + string(APPEND RunCMake_TEST_FAILED "${name} solution has no project with expected TYPE=${type}\n") endif() check_custom_platform("${sln}" "${name}" "${platform}" passed_platform) if(NOT passed_platform) - string(APPEND failed "${sep}${name} solution has no project with expected PLATFORM=${platform}") - set(sep "\n") + string(APPEND RunCMake_TEST_FAILED "${name} solution has no project with expected PLATFORM=${platform}\n") endif() check_custom_configuration("${sln}" "${name}" "Release" "${imported_release_config_name}" passed_configuration) if(NOT passed_configuration) - string(APPEND failed "${sep}${name} solution has no project with expected CONFIG=${imported_release_config_name}") - set(sep "\n") + string(APPEND RunCMake_TEST_FAILED "${name} solution has no project with expected CONFIG=${imported_release_config_name}\n") endif() - set(RunCMake_TEST_FAILED "${failed}" PARENT_SCOPE) + set(RunCMake_TEST_FAILED "${RunCMake_TEST_FAILED}" PARENT_SCOPE) endfunction() -- cgit v0.12