CPack/RPM adding dist to release tag test
Tests and release notes
This commit is contained in:
parent
f7003a6055
commit
f5089cfccd
|
@ -0,0 +1,7 @@
|
|||
cpack-rpm-adding-dist-to-release-tag
|
||||
------------------------------------
|
||||
|
||||
* The :module:`CPackRPM` module learned how to set RPM ``dist`` tag as part of
|
||||
RPM ``Release:`` tag when enabled (mandatory on some Linux distributions for
|
||||
e.g. on Fedora).
|
||||
See :variable:`CPACK_RPM_PACKAGE_RELEASE_DIST`.
|
|
@ -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$")
|
|
@ -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()
|
|
@ -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")
|
|
@ -11,4 +11,5 @@ run_cpack_test(DEPENDENCIES "RPM;DEB" true)
|
|||
run_cpack_test(EMPTY_DIR "RPM;DEB;TGZ" true)
|
||||
run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB;TGZ" true)
|
||||
run_cpack_test(PER_COMPONENT_FIELDS "RPM;DEB" false)
|
||||
run_cpack_test(RPM_DIST "RPM" false)
|
||||
run_cpack_test(INSTALL_SCRIPTS "RPM" false)
|
||||
|
|
Loading…
Reference in New Issue