[Cmake-commits] CMake branch, next, updated. v3.7.0-rc1-215-gc207ecc

Brad King brad.king at kitware.com
Fri Oct 7 11:30:55 EDT 2016


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  c207eccdf8224900f5d44ead6f8ee2fb89c9bfc1 (commit)
       via  7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19 (commit)
      from  0076f00d2d174da03b50ad5b06fa820ee47264c6 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c207eccdf8224900f5d44ead6f8ee2fb89c9bfc1
commit c207eccdf8224900f5d44ead6f8ee2fb89c9bfc1
Merge: 0076f00 7f90d5e
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 7 11:30:54 2016 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 7 11:30:54 2016 -0400

    Merge topic 'test-cpack-improve-failure-messages' into next
    
    7f90d5e5 Tests: Improve RunCMake.CPack_* failure message formatting


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19
commit 7f90d5e5ccfa862ebd99bd79632cc9351fe2ee19
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 7 11:28:32 2016 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Oct 7 11:28:32 2016 -0400

    Tests: Improve RunCMake.CPack_* failure message formatting
    
    Format a `message(FATAL_ERROR)` call with markup to make the generated
    message more readable so that the difference between the actual and
    expected results is easier to see.

diff --git a/Tests/RunCMake/CPack/VerifyResult.cmake b/Tests/RunCMake/CPack/VerifyResult.cmake
index 8bc2a58..ad2a651 100644
--- a/Tests/RunCMake/CPack/VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/VerifyResult.cmake
@@ -27,10 +27,12 @@ if(NOT EXPECTED_FILES_COUNT EQUAL 0)
           expected_content_list "${PACKAGE_CONTENT}")
 
       if(NOT expected_content_list)
+        string(REPLACE "\n" "\n actual> " msg_actual "\n${PACKAGE_CONTENT}")
+        string(REPLACE "\n" "\n expect> " msg_expected "\n${EXPECTED_FILE_CONTENT_${file_no_}}")
         message(FATAL_ERROR
           "Unexpected file content for file No. '${file_no_}'!\n"
-          " Content: '${PACKAGE_CONTENT}'\n\n"
-          " Expected: '${EXPECTED_FILE_CONTENT_${file_no_}}'"
+          "The content was:${msg_actual}\n"
+          "which does not match:${msg_expected}\n"
           "${output_error_message}")
       endif()
     else()

-----------------------------------------------------------------------

Summary of changes:
 Tests/RunCMake/CPack/VerifyResult.cmake |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list