Tests/RunCMake/Framework: Improve failure messages

This commit is contained in:
Brad King
2024-06-18 11:36:48 -04:00
parent 9c56c46ed4
commit 7c1a18655b
3 changed files with 53 additions and 27 deletions

View File

@@ -20,26 +20,32 @@ else()
endif()
if(NOT IS_DIRECTORY ${framework_dir})
message(SEND_ERROR "Framework dir not found at ${framework_dir}")
set(RunCMake_TEST_FAILED "Framework dir not found at \n ${framework_dir}")
return()
endif()
if(IS_DIRECTORY ${non_existent_debug_framework_dir})
message(SEND_ERROR
"A framework dir with a debug suffix should not exist at ${non_existent_debug_framework_dir}")
set(RunCMake_TEST_FAILED
"A framework dir with a debug suffix should not exist at \n ${non_existent_debug_framework_dir}")
return()
endif()
if(NOT IS_SYMLINK "${symlink_release_path}")
message(SEND_ERROR "Release framework symlink not found at ${symlink_release_path}")
set(RunCMake_TEST_FAILED "Release framework symlink not found at \n ${symlink_release_path}")
return()
endif()
if(NOT IS_SYMLINK "${symlink_debug_path}")
message(SEND_ERROR "Debug framework symlink not found at ${symlink_debug_path}")
set(RunCMake_TEST_FAILED "Debug framework symlink not found at \n ${symlink_debug_path}")
return()
endif()
if(NOT EXISTS "${framework_release_path}")
message(SEND_ERROR "Release framework not found at ${framework_release_path}")
set(RunCMake_TEST_FAILED "Release framework not found at \n ${framework_release_path}")
return()
endif()
if(NOT EXISTS "${framework_debug_path}")
message(SEND_ERROR "Debug framework not found at ${framework_debug_path}")
set(RunCMake_TEST_FAILED "Debug framework not found at \n ${framework_debug_path}")
return()
endif()

View File

@@ -10,41 +10,51 @@ set(plist-file "${framework-resources}/Info.plist")
set(framework-header "${framework-dir}/Headers/foo.h")
if(NOT IS_DIRECTORY ${framework-dir})
message(SEND_ERROR "Framework not found at ${framework-dir}")
set(RunCMake_TEST_FAILED "Framework not found at \n ${framework-dir}")
return()
endif()
if(NOT EXISTS ${plist-file})
message(SEND_ERROR "plist file not found at ${plist-file}")
set(RunCMake_TEST_FAILED "plist file not found at \n ${plist-file}")
return()
endif()
if(NOT EXISTS ${framework-library})
message(SEND_ERROR "Framework library not found at ${framework-library}")
set(RunCMake_TEST_FAILED "Framework library not found at \n ${framework-library}")
return()
endif()
if(NOT EXISTS ${framework-resource-file})
message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}")
set(RunCMake_TEST_FAILED "Framework resource file not found at \n ${framework-resource-file}")
return()
endif()
if(NOT EXISTS ${framework-flat-resource-file})
message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}")
set(RunCMake_TEST_FAILED "Framework flat resource file not found at \n ${framework-flat-resource-file}")
return()
endif()
if(NOT EXISTS ${framework-deep-resource-file})
message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}")
set(RunCMake_TEST_FAILED "Framework deep resource file not found at \n ${framework-deep-resource-file}")
return()
endif()
if(NOT EXISTS ${framework-some-file})
message(SEND_ERROR "Framework some file not found at ${framework-some-file}")
set(RunCMake_TEST_FAILED "Framework some file not found at \n ${framework-some-file}")
return()
endif()
if(NOT EXISTS ${framework-versions})
message(SEND_ERROR "Framework versions not found at ${framework-versions}")
set(RunCMake_TEST_FAILED "Framework versions not found at \n ${framework-versions}")
return()
endif()
if(NOT EXISTS ${framework-resources})
message(SEND_ERROR "Framework Resources not found at ${framework-resources}")
set(RunCMake_TEST_FAILED "Framework Resources not found at \n ${framework-resources}")
return()
endif()
if(NOT EXISTS ${framework-header})
message(SEND_ERROR "Framework header file not found at ${framework-header}")
set(RunCMake_TEST_FAILED "Framework header file not found at \n ${framework-header}")
return()
endif()

View File

@@ -10,41 +10,51 @@ set(plist-file "${framework-dir}/Info.plist")
set(framework-header "${framework-dir}/Headers/foo.h")
if(NOT IS_DIRECTORY ${framework-dir})
message(SEND_ERROR "Framework not found at ${framework-dir}")
set(RunCMake_TEST_FAILED "Framework not found at\n ${framework-dir}")
return()
endif()
if(NOT EXISTS ${plist-file})
message(SEND_ERROR "plist file not found at ${plist-file}")
set(RunCMake_TEST_FAILED "plist file not found at\n ${plist-file}")
return()
endif()
if(NOT EXISTS ${framework-library})
message(SEND_ERROR "Framework library not found at ${framework-library}")
set(RunCMake_TEST_FAILED "Framework library not found at\n ${framework-library}")
return()
endif()
if(NOT EXISTS ${framework-resource-file})
message(SEND_ERROR "Framework resource file not found at ${framework-resource-file}")
set(RunCMake_TEST_FAILED "Framework resource file not found at\n ${framework-resource-file}")
return()
endif()
if(NOT EXISTS ${framework-flat-resource-file})
message(SEND_ERROR "Framework flat resource file not found at ${framework-flat-resource-file}")
set(RunCMake_TEST_FAILED "Framework flat resource file not found at\n ${framework-flat-resource-file}")
return()
endif()
if(NOT EXISTS ${framework-deep-resource-file})
message(SEND_ERROR "Framework deep resource file not found at ${framework-deep-resource-file}")
set(RunCMake_TEST_FAILED "Framework deep resource file not found at\n ${framework-deep-resource-file}")
return()
endif()
if(NOT EXISTS ${framework-some-file})
message(SEND_ERROR "Framework some file not found at ${framework-some-file}")
set(RunCMake_TEST_FAILED "Framework some file not found at\n ${framework-some-file}")
return()
endif()
if(EXISTS ${framework-versions})
message(SEND_ERROR "Framework versions found at ${framework-versions}")
set(RunCMake_TEST_FAILED "Framework versions found at\n ${framework-versions}")
return()
endif()
if(EXISTS ${framework-resources})
message(SEND_ERROR "Framework Resources found at ${framework-resources}")
set(RunCMake_TEST_FAILED "Framework Resources found at\n ${framework-resources}")
return()
endif()
if(NOT EXISTS ${framework-header})
message(SEND_ERROR "Framework headers not found at ${framework-header}")
set(RunCMake_TEST_FAILED "Framework headers not found at\n ${framework-header}")
return()
endif()