From 4f2ff6019bbc94fd6a875699dd812f2819131dab Mon Sep 17 00:00:00 2001 From: Raffi Enficiaud Date: Fri, 11 Sep 2015 17:31:01 +0200 Subject: Tests: Make RunCMake.CPack error messages more readable --- Tests/RunCMake/CPack/DEB/Helpers.cmake | 2 +- Tests/RunCMake/CPack/README.txt | 4 ++-- Tests/RunCMake/CPack/VerifyResult.cmake | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake index a204a3c..b6f113b 100644 --- a/Tests/RunCMake/CPack/DEB/Helpers.cmake +++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake @@ -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() diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index 365c737..ea68304 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -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 '/-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: diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake index 96efa9e..6eab531 100644 --- a/Tests/RunCMake/CPack/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/VerifyResult.cmake @@ -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_) -- cgit v0.12