Преглед изворни кода

Tests: Fix RunCMake.include_external_msproject .sln check failure

Accumulate failures instead of only considering the last case.
Brad King пре 3 дана
родитељ
комит
00db01ddcd
1 измењених фајлова са 5 додато и 11 уклоњено
  1. 5 11
      Tests/RunCMake/include_external_msproject/check_utils.cmake

+ 5 - 11
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()