diff options
author | Domen Vrankar <domen.vrankar@gmail.com> | 2015-06-05 19:12:08 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-06-15 19:09:07 (GMT) |
commit | 5f61ed991b3b6b9f61edc97a10b257d3343c7302 (patch) | |
tree | 42a19c465b529b7ba6b37d3940704fa4f6f84eea /Tests/RunCMake/CPack | |
parent | e726fc025a3543c0be8a4eb217b0a80f9c16051c (diff) | |
download | CMake-5f61ed991b3b6b9f61edc97a10b257d3343c7302.zip CMake-5f61ed991b3b6b9f61edc97a10b257d3343c7302.tar.gz CMake-5f61ed991b3b6b9f61edc97a10b257d3343c7302.tar.bz2 |
Tests: Move RunCMake.CPackRPM case into RunCMake.CPack_RPM test
Move PARTIALLY_RELOCATABLE_WARNING test to the new common CPack test
script structure to have all tests in one place as well as additional
benefit of having some more checks done during test execution.
Diffstat (limited to 'Tests/RunCMake/CPack')
4 files changed, 13 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPack/PARTIALLY_RELOCATABLE_WARNING.cmake b/Tests/RunCMake/CPack/PARTIALLY_RELOCATABLE_WARNING.cmake new file mode 100644 index 0000000..31e729b --- /dev/null +++ b/Tests/RunCMake/CPack/PARTIALLY_RELOCATABLE_WARNING.cmake @@ -0,0 +1,6 @@ +install(FILES CMakeLists.txt DESTINATION /not_relocatable COMPONENT static) + +set(CPACK_PACKAGE_RELOCATABLE TRUE) +set(CPACK_PACKAGING_INSTALL_PREFIX "/opt") + +set(CPACK_RPM_COMPONENT_INSTALL ON) diff --git a/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake new file mode 100644 index 0000000..4e01f7b --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-ExpectedFiles.cmake @@ -0,0 +1,5 @@ +set(whitespaces_ "[\t\n\r ]*") + +set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_1 "PARTIALLY_RELOCATABLE_WARNING-0.1.1-*.rpm") +set(EXPECTED_FILE_CONTENT_1 "^/not_relocatable${whitespaces_}/not_relocatable/CMakeLists.txt${whitespaces_}/opt$") diff --git a/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-stderr.txt b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-stderr.txt new file mode 100644 index 0000000..3b63d5b --- /dev/null +++ b/Tests/RunCMake/CPack/RPM/PARTIALLY_RELOCATABLE_WARNING-stderr.txt @@ -0,0 +1 @@ +CPackRPM:Warning: Path /not_relocatable/CMakeLists.txt is not on one of the.*relocatable paths! Package will be partially relocatable. diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 426734e..308b8cc 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -5,3 +5,4 @@ include("${RunCMake_SOURCE_DIR}/CPackTestHelpers.cmake") # args: TEST_NAME "GENERATORS" RUN_CMAKE_BUILD_STEP run_cpack_test(MINIMAL "RPM;DEB" false) +run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false) |