diff options
author | Brad King <brad.king@kitware.com> | 2016-05-16 14:11:35 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-05-16 14:11:35 (GMT) |
commit | d3db070e9eb7890958ae2b9d91085f5c7c6770f8 (patch) | |
tree | 0d219ed62ac1ec81240d19a5b64d64892fc8a5d0 /Tests | |
parent | bc7598fde0e6d9322667f14be8d062b8ba68e666 (diff) | |
parent | f5089cfccd96f2c94838faa1736fa452ae4bb853 (diff) | |
download | CMake-d3db070e9eb7890958ae2b9d91085f5c7c6770f8.zip CMake-d3db070e9eb7890958ae2b9d91085f5c7c6770f8.tar.gz CMake-d3db070e9eb7890958ae2b9d91085f5c7c6770f8.tar.bz2 |
Merge topic 'cpack-rpm-adding-dist-to-release-tag'
f5089cfc CPack/RPM adding dist to release tag test
f7003a60 CPack/RPM release dist tag support
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake | 5 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/RPM/RPM_DIST-VerifyResult.cmake | 11 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/RPM_DIST.cmake | 4 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 |
4 files changed, 21 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake new file mode 100644 index 0000000..3b5a347 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/RPM_DIST-ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "rpm_dist*.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/usr/foo${whitespaces_}/usr/foo/CMakeLists.txt$") diff --git a/Tests/RunCMake/CPack/RPM/RPM_DIST-VerifyResult.cmake b/Tests/RunCMake/CPack/RPM/RPM_DIST-VerifyResult.cmake new file mode 100644 index 0000000..7375ecc --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/RPM_DIST-VerifyResult.cmake @@ -0,0 +1,11 @@ +execute_process(COMMAND ${RPMBUILD_EXECUTABLE} -E %{?dist} + OUTPUT_VARIABLE DIST_TAG + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE) + +set(whitespaces_ "[\t\n\r ]*") + +getPackageInfo("${FOUND_FILE_1}" "FILE_INFO_") +if(NOT FILE_INFO_ MATCHES ".*Release${whitespaces_}:${whitespaces_}1${DIST_TAG}") + message(FATAL_ERROR "Unexpected Release in '${FOUND_FILE_1}'; file info: '${FILE_INFO_}'") +endif() diff --git a/Tests/RunCMake/CPack/RPM_DIST.cmake b/Tests/RunCMake/CPack/RPM_DIST.cmake new file mode 100644 index 0000000..eb2a123 --- /dev/null +++ b/Tests/RunCMake/CPack/RPM_DIST.cmake @@ -0,0 +1,4 @@ +install(FILES CMakeLists.txt DESTINATION foo COMPONENT test) + +set(CPACK_RPM_PACKAGE_RELEASE_DIST ON) +set(CPACK_PACKAGE_NAME "rpm_dist") diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 0f3fc57..759295f 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -12,6 +12,7 @@ run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true) run_cpack_test(RPM_CUSTOM_NAMES "RPM" true) run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false) +run_cpack_test(RPM_DIST "RPM" false) run_cpack_test(INSTALL_SCRIPTS "RPM" false) run_cpack_test(DEB_GENERATE_SHLIBS "DEB" true) run_cpack_test(DEB_GENERATE_SHLIBS_LDCONFIG "DEB" true) |