diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2021-07-12 23:58:17 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-07-13 12:36:12 (GMT) |
commit | 593ff734b08779bc2ac3f7d5975c2d12dfa5614b (patch) | |
tree | 4756a3b25598370866512d6c5aea154675ca664d /Tests/RunCMake/CPack | |
parent | c8f298ae0808675ddd70341f7c83348bc092fb3f (diff) | |
download | CMake-593ff734b08779bc2ac3f7d5975c2d12dfa5614b.zip CMake-593ff734b08779bc2ac3f7d5975c2d12dfa5614b.tar.gz CMake-593ff734b08779bc2ac3f7d5975c2d12dfa5614b.tar.bz2 |
CPack/DEB: dbgsym package not generated for non-component packaging
Fix: #19735
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r-- | Tests/RunCMake/CPack/RunCMakeTest.cmake | 1 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake | 66 | ||||
-rw-r--r-- | Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake | 2 |
3 files changed, 44 insertions, 25 deletions
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 746ff8b..7997c78 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -7,6 +7,7 @@ include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") run_cpack_test(CUSTOM_BINARY_SPEC_FILE "RPM.CUSTOM_BINARY_SPEC_FILE" false "MONOLITHIC;COMPONENT") run_cpack_test(CUSTOM_NAMES "RPM.CUSTOM_NAMES;DEB.CUSTOM_NAMES;TGZ;DragNDrop" true "COMPONENT") run_cpack_test(DEBUGINFO "RPM.DEBUGINFO;DEB.DEBUGINFO" true "COMPONENT") +run_cpack_test(DEBUGINFO "DEB.DEBUGINFO" true "MONOLITHIC") run_cpack_test_subtests(DEFAULT_PERMISSIONS "CMAKE_var_set;CPACK_var_set;both_set;invalid_CMAKE_var;invalid_CPACK_var" "RPM.DEFAULT_PERMISSIONS;DEB.DEFAULT_PERMISSIONS" false "MONOLITHIC;COMPONENT") run_cpack_test(DEPENDENCIES "RPM.DEPENDENCIES;DEB.DEPENDENCIES" true "COMPONENT") run_cpack_test(DIST "RPM.DIST" false "MONOLITHIC") diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake index cf4aa51..b3e6485 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake @@ -1,8 +1,5 @@ set(whitespaces_ "[\t\n\r ]*") -set(EXPECTED_FILES_COUNT "6") -set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) - if(GENERATOR_TYPE STREQUAL "RPM") set(NAME "Debuginfo") set(DEBUG_SUFFIX "debuginfo") @@ -15,30 +12,49 @@ elseif(GENERATOR_TYPE STREQUAL "DEB") set(DEBUG_PKG "ddeb") endif() -set(EXPECTED_FILE_1_NAME "${NAME}") -set(EXPECTED_FILE_1_COMPONENT "applications") -set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") +set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) -set(EXPECTED_FILE_2 "TestDinfo-pkg*-headers.${PKG}") -set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") +if(PACKAGING_TYPE STREQUAL "COMPONENT") + set(EXPECTED_FILES_COUNT "6") -set(EXPECTED_FILE_3 "TestDinfo-pkg*-libs.${PKG}") -set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so") + set(EXPECTED_FILE_1_NAME "${NAME}") + set(EXPECTED_FILE_1_COMPONENT "applications") + set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") -set(EXPECTED_FILE_4 "${NAME}-applications-${DEBUG_SUFFIX}*.${DEBUG_PKG}") -if(GENERATOR_TYPE STREQUAL "RPM") - set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*") -elseif(GENERATOR_TYPE STREQUAL "DEB") - set(EXPECTED_FILE_CONTENT_4 ".*/usr/lib/debug/.build-id/.*\.debug.*") -endif() + set(EXPECTED_FILE_2 "TestDinfo-pkg*-headers.${PKG}") + set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") -if(GENERATOR_TYPE STREQUAL "RPM") - set(EXPECTED_FILE_5 "libs-DebugInfoPackage.rpm") - set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*") -elseif(GENERATOR_TYPE STREQUAL "DEB") - set(EXPECTED_FILE_5 "TestDinfo-pkg-libs-dbgsym.ddeb") - set(EXPECTED_FILE_CONTENT_5 ".*/usr/lib/debug/.build-id/.*\.debug.*") -endif() + set(EXPECTED_FILE_3 "TestDinfo-pkg*-libs.${PKG}") + set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so") + + set(EXPECTED_FILE_4 "${NAME}-applications-${DEBUG_SUFFIX}*.${DEBUG_PKG}") + if(GENERATOR_TYPE STREQUAL "RPM") + set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*\.debug.*") + elseif(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_CONTENT_4 ".*/usr/lib/debug/.build-id/.*\.debug.*") + endif() + + if(GENERATOR_TYPE STREQUAL "RPM") + set(EXPECTED_FILE_5 "libs-DebugInfoPackage.rpm") + set(EXPECTED_FILE_CONTENT_5 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/test_lib.cpp.*\.debug.*") + elseif(GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILE_5 "TestDinfo-pkg-libs-dbgsym.ddeb") + set(EXPECTED_FILE_CONTENT_5 ".*/usr/lib/debug/.build-id/.*\.debug.*") + endif() + + set(EXPECTED_FILE_6 "TestDinfo-pkg*-appheaders.${PKG}") + set(EXPECTED_FILE_CONTENT_6_LIST "/include;/include/test_lib.hpp") -set(EXPECTED_FILE_6 "TestDinfo-pkg*-appheaders.${PKG}") -set(EXPECTED_FILE_CONTENT_6_LIST "/include;/include/test_lib.hpp") +elseif(PACKAGING_TYPE STREQUAL "MONOLITHIC" AND GENERATOR_TYPE STREQUAL "DEB") + set(EXPECTED_FILES_COUNT "2") + + set(EXPECTED_FILE_1 "TestDinfo-pkg.deb") + set( + EXPECTED_FILE_CONTENT_1_LIST + "/bar;/bar/CMakeLists.txt;/bas;/bas/libtest_lib.so;/foo;/foo/test_prog;/include;/include/test_lib.hpp" + ) + + set(EXPECTED_FILE_2 "TestDinfo-pkg-dbgsym.ddeb") + set(EXPECTED_FILE_CONTENT_2 ".*/usr/lib/debug/.build-id/.*\.debug.*") + +endif() diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake index 9ff1f8a..e9cebbf 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/test.cmake @@ -28,6 +28,8 @@ install(TARGETS test_prog DESTINATION foo COMPONENT applications) install(FILES CMakeLists.txt DESTINATION bar COMPONENT headers) install(TARGETS test_lib DESTINATION bas COMPONENT libs) +set(CPACK_DEBIAN_DEBUGINFO_PACKAGE ON) + set(CPACK_RPM_APPLICATIONS_FILE_NAME "RPM-DEFAULT") set(CPACK_RPM_APPLICATIONS_DEBUGINFO_PACKAGE ON) set(CPACK_DEBIAN_APPLICATIONS_FILE_NAME "DEB-DEFAULT") |