Tests: Make RunCMake.CPack error messages more readable
This commit is contained in:
parent
81b748ae1d
commit
4f2ff6019b
|
@ -14,7 +14,7 @@ function(verifyDebControl FILE PREFIX VERIFY_FILES)
|
|||
ERROR_VARIABLE err_)
|
||||
|
||||
if(err_)
|
||||
message(FATAL_ERROR "Debian controll verification failed for file: "
|
||||
message(FATAL_ERROR "Debian control verification failed for file: "
|
||||
"'${FILE}'; error output: '${err_}'")
|
||||
endif()
|
||||
|
||||
|
|
|
@ -32,14 +32,14 @@ different types of packages. This script is placed into CPack test root
|
|||
directory even if it will be used for only one of the generators.
|
||||
|
||||
If test will be used for multiple generators but some of them require some
|
||||
generator speciffic commands then those commands should be added to a separate
|
||||
generator specific commands then those commands should be added to a separate
|
||||
file that should be located in '<generator_name>/<test_name>-specifics.cmake'
|
||||
in CPack test root directory.
|
||||
|
||||
CPack execution phase:
|
||||
----------------------
|
||||
|
||||
Only exececutes CPack for content that was generated during CMake execution
|
||||
Only executes CPack for content that was generated during CMake execution
|
||||
phase.
|
||||
|
||||
Verification of generated files:
|
||||
|
|
|
@ -28,8 +28,9 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
|
|||
|
||||
if(NOT expected_content_list)
|
||||
message(FATAL_ERROR
|
||||
"Unexpected file content for file No. '${file_no_}'!"
|
||||
" Content: '${PACKAGE_CONTENT}'"
|
||||
"Unexpected file content for file No. '${file_no_}'!\n"
|
||||
" Content: '${PACKAGE_CONTENT}'\n\n"
|
||||
" Expected: '${EXPECTED_FILE_CONTENT_${file_no_}}'"
|
||||
"${output_error_message}")
|
||||
endif()
|
||||
else()
|
||||
|
@ -56,7 +57,7 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
|
|||
"${output_error_message}")
|
||||
endif()
|
||||
|
||||
# sanity check that we didn't accidentaly list wrong files with our regular
|
||||
# sanity check that we didn't accidentally list wrong files with our regular
|
||||
# expressions
|
||||
foreach(expected_ IN LISTS allFoundFiles_)
|
||||
list(FIND foundFiles_ "${expected_}" found_)
|
||||
|
|
Loading…
Reference in New Issue