diff options
author | Brad King <brad.king@kitware.com> | 2017-03-27 13:09:39 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-03-27 13:09:42 (GMT) |
commit | 42b7d132a8a20f06fec3a8a7d1dc1820f95e6896 (patch) | |
tree | ccca9fbf81d05ce6dac7275758e781df3642d18f /Tests/RunCMake/CPack | |
parent | 341b42024b066d4cfcc178f53b2caf2eaacfabb8 (diff) | |
parent | 4ba065b22b544a509c76e497306b65e2dc0d5ee7 (diff) | |
download | CMake-42b7d132a8a20f06fec3a8a7d1dc1820f95e6896.zip CMake-42b7d132a8a20f06fec3a8a7d1dc1820f95e6896.tar.gz CMake-42b7d132a8a20f06fec3a8a7d1dc1820f95e6896.tar.bz2 |
Merge topic 'cpack-rpm-tests-handle-build-id-links'
4ba065b2 CPack/RPM tests: handle build-id links
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !628
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r-- | Tests/RunCMake/CPack/RPM/Helpers.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake | 4 |
2 files changed, 7 insertions, 1 deletions
diff --git a/Tests/RunCMake/CPack/RPM/Helpers.cmake b/Tests/RunCMake/CPack/RPM/Helpers.cmake index bbc358c8..d8012b1 100644 --- a/Tests/RunCMake/CPack/RPM/Helpers.cmake +++ b/Tests/RunCMake/CPack/RPM/Helpers.cmake @@ -36,6 +36,10 @@ function(getPackageContentList FILE RESULT_VAR) OUTPUT_STRIP_TRAILING_WHITESPACE) string(REGEX REPLACE "\n" ";" package_content_ "${package_content_}") + # never versions of rpmbuild (introduced in rpm 4.13.0.1) add build_id links + # to packages - tests should ignore them + list(FILTER package_content_ EXCLUDE REGEX ".*\.build-id.*") + set(${RESULT_VAR} "${package_content_}" PARENT_SCOPE) endfunction() diff --git a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake index bc54d79..73d7481 100644 --- a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake +++ b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/VerifyResult.cmake @@ -21,7 +21,9 @@ execute_process(COMMAND ${RPMBUILD_EXECUTABLE} --define "_topdir ${CMAKE_CURRENT set(output_error_message_ "\n${RPMBUILD_EXECUTABLE} error: '${error_}';\nresult: '${result_}';\n${output_error_message}") -set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog$") +# expected file content are test_prog and optional build-id links that are +# generated by rpmbuild (introduced in rpm 4.13.0.1) +set(EXPECTED_FILE_CONTENT_ "^/foo${whitespaces_}/foo/test_prog(${whitespaces_}.*\.build-id.*)*$") file(GLOB_RECURSE FOUND_FILE_ RELATIVE "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS" "${CMAKE_CURRENT_BINARY_DIR}/test_rpm/RPMS/*.rpm") list(APPEND foundFiles_ "${FOUND_FILE_}") |