diff options
author | Brad King <brad.king@kitware.com> | 2017-11-20 15:09:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2017-11-20 15:09:14 (GMT) |
commit | 66b37132b6c7d347a0fe83ee5082a751e8e0d9aa (patch) | |
tree | 3b5f9fa1232026762b90716d976dc33de315b8dd /Tests | |
parent | 345ae8d0e1133971e8acff93d6fcdf653c4d2e11 (diff) | |
parent | 325f34d1507d391e5125d0a57e3575ecbe4e6f13 (diff) | |
download | CMake-66b37132b6c7d347a0fe83ee5082a751e8e0d9aa.zip CMake-66b37132b6c7d347a0fe83ee5082a751e8e0d9aa.tar.gz CMake-66b37132b6c7d347a0fe83ee5082a751e8e0d9aa.tar.bz2 |
Merge topic 'cpack-minor-cleanup-and-tests-extension'
325f34d1 CPack tests: add possibility for expecting config developer warnings
176281e1 CPack test: correctly handle CPACK_PACKAGING_INSTALL_PREFIX
cf0c2599 CPack: set variable commands in lower case
2ff906b3 CPack: documentation typo fix
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1499
Diffstat (limited to 'Tests')
31 files changed, 150 insertions, 66 deletions
diff --git a/Tests/RunCMake/CPack/ArchiveCommon/common_helpers.cmake b/Tests/RunCMake/CPack/ArchiveCommon/common_helpers.cmake index 99d3155..948c6ab 100644 --- a/Tests/RunCMake/CPack/ArchiveCommon/common_helpers.cmake +++ b/Tests/RunCMake/CPack/ArchiveCommon/common_helpers.cmake @@ -45,13 +45,22 @@ function(toExpectedContentList FILE_NO CONTENT_VAR) unset(prefix_) endif() - if(NOT DEFINED TEST_MAIN_INSTALL_PREFIX_PATH) - set(TEST_MAIN_INSTALL_PREFIX_PATH "/usr") + # add install prefix to expected paths + if(DEFINED EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX) + set(EXPECTED_FILE_PACKAGING_PREFIX + "${EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX}") + elseif(NOT DEFINED EXPECTED_FILE_PACKAGING_PREFIX) + # default CPack Archive packaging install prefix + set(EXPECTED_FILE_PACKAGING_PREFIX "/") endif() + set(prepared_ "${EXPECTED_FILE_PACKAGING_PREFIX}") + foreach(part_ IN LISTS ${CONTENT_VAR}) + list(APPEND prepared_ "${EXPECTED_FILE_PACKAGING_PREFIX}${part_}") + endforeach() unset(filtered_) - foreach(part_ IN LISTS ${CONTENT_VAR}) - string(REGEX REPLACE "^${TEST_MAIN_INSTALL_PREFIX_PATH}(/|$)" "" part_ "${part_}") + foreach(part_ IN LISTS prepared_) + string(REGEX REPLACE "^/" "" part_ "${part_}") if(part_) list(APPEND filtered_ "${prefix_}${part_}") diff --git a/Tests/RunCMake/CPack/CPackTestHelpers.cmake b/Tests/RunCMake/CPack/CPackTestHelpers.cmake index 5337b2c..447b08b 100644 --- a/Tests/RunCMake/CPack/CPackTestHelpers.cmake +++ b/Tests/RunCMake/CPack/CPackTestHelpers.cmake @@ -35,10 +35,27 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK "-DRunCMake_TEST_FILE_PREFIX=${TEST_NAME}" "-DRunCMake_SUBTEST_SUFFIX=${SUBTEST_SUFFIX}" "-DPACKAGING_TYPE=${PACKAGING_TYPE}") + + foreach(o out err) + if(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/configure-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/configure-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt") + elseif(SUBTEST_SUFFIX AND EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/configure-${SUBTEST_SUFFIX}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/configure-${SUBTEST_SUFFIX}-std${o}.txt") + elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/configure-${PACKAGING_TYPE}-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/configure-${PACKAGING_TYPE}-std${o}.txt") + elseif(EXISTS ${RunCMake_SOURCE_DIR}/tests/${TEST_NAME}/configure-std${o}.txt) + set(RunCMake-std${o}-file "tests/${TEST_NAME}/configure-std${o}.txt") + else() + unset(RunCMake-std${o}-file) + endif() + endforeach() + run_cmake(${full_test_name_}) # execute optional build step if(build) + unset(RunCMake-stdout-file) + unset(RunCMake-stderr-file) run_cmake_command(${full_test_name_}-Build "${CMAKE_COMMAND}" --build "${RunCMake_TEST_BINARY_DIR}") endif() @@ -72,6 +89,8 @@ function(run_cpack_test_common_ TEST_NAME types build SUBTEST_SUFFIX source PACK set(RunCMake-std${o}-file "tests/${TEST_NAME}/${SUBTEST_SUFFIX}-std${o}.txt") elseif(EXISTS ${RunCMake_SOURCE_DIR}/${TEST_TYPE}/default_expected_std${o}.txt) set(RunCMake-std${o}-file "${TEST_TYPE}/default_expected_std${o}.txt") + else() + unset(RunCMake-std${o}-file) endif() endforeach() diff --git a/Tests/RunCMake/CPack/DEB/Helpers.cmake b/Tests/RunCMake/CPack/DEB/Helpers.cmake index 6d8e84a..f7c5c84 100644 --- a/Tests/RunCMake/CPack/DEB/Helpers.cmake +++ b/Tests/RunCMake/CPack/DEB/Helpers.cmake @@ -47,7 +47,20 @@ function(getPackageContentList FILE RESULT_VAR) endfunction() function(toExpectedContentList FILE_NO CONTENT_VAR) - # no need to do anything + # add install prefix to expected paths + if(DEFINED EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX) + set(EXPECTED_FILE_PACKAGING_PREFIX + "${EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX}") + elseif(NOT DEFINED EXPECTED_FILE_PACKAGING_PREFIX) + # default CPackDeb packaging install prefix + set(EXPECTED_FILE_PACKAGING_PREFIX "/usr") + endif() + set(prepared_ "${EXPECTED_FILE_PACKAGING_PREFIX}") + foreach(part_ IN LISTS ${CONTENT_VAR}) + list(APPEND prepared_ "${EXPECTED_FILE_PACKAGING_PREFIX}${part_}") + endforeach() + + set(${CONTENT_VAR} "${prepared_}" PARENT_SCOPE) endfunction() function(getMissingShlibsErrorExtra FILE RESULT_VAR) diff --git a/Tests/RunCMake/CPack/README.txt b/Tests/RunCMake/CPack/README.txt index 5877f97..2e2abdf 100644 --- a/Tests/RunCMake/CPack/README.txt +++ b/Tests/RunCMake/CPack/README.txt @@ -96,6 +96,14 @@ the test has to run some functions after CPack.cmake is included. In such cases a function run_after_include_cpack can be declared in test.cmake file and that function will run after the inclusion of CPack.cmake. +NOTE: During CMake configure stage developer warnings may be expected. In such +cases an expected output regular expression can be provided by creating +'<test_name>/configure-stdout.txt' and/or '<test_name>/configure-stderr.txt' +file. There are also more specialized versions of the file available: +- configure-${PACKAGING_TYPE}-${SUBTEST_SUFFIX}-std${o}.txt +- configure-${SUBTEST_SUFFIX}-std${o}.txt +- configure-${PACKAGING_TYPE}-std${o}.txt + build phase (optional and not available for source package tests) ----------------------------------------------------------------- @@ -153,13 +161,19 @@ this step and must contain is later changed automatically depending on the generator so expected package content can be written only once per test for all generators. +- EXPECTED_FILE_PACKAGING_PREFIX and + EXPECTED_FILE_<file_number_starting_with_1>_PACKAGING_PREFIX variables can be + set to explicitly specified CPACK_PACKAGING_PREFIX value. By default this + variable does not need to be set as it is implicitly set to package generator + specific prefix. + Optional verification phase is generator specific and is optionaly executed. This phase is executed if '<test_name>/VerifyResult.cmake' script exists. VerifyResult.cmake script also automatically prints out standard output and standard error from CPack execution phase that is compared with '<test_name>/<generator_name>-stdout.txt' regular expression and -and '<test_name>/<generator_name>-stderr.txt' regular expresson respectively. +'<test_name>/<generator_name>-stderr.txt' regular expresson respectively. NOTE: For subtests generator name can also be suffixed with subtest name and/or packaging type (MONOLITHIC, COMPONENT, GROUP) and in such cases the preferences of which file will be used are as follows: diff --git a/Tests/RunCMake/CPack/RPM/Helpers.cmake b/Tests/RunCMake/CPack/RPM/Helpers.cmake index 88fc231..a29c020 100644 --- a/Tests/RunCMake/CPack/RPM/Helpers.cmake +++ b/Tests/RunCMake/CPack/RPM/Helpers.cmake @@ -47,14 +47,29 @@ function(getPackageContentList FILE RESULT_VAR) endfunction() function(toExpectedContentList FILE_NO CONTENT_VAR) - if(NOT DEFINED TEST_INSTALL_PREFIX_PATHS) - set(TEST_INSTALL_PREFIX_PATHS "/usr") + # add install prefix to expected paths + if(DEFINED EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX) + set(EXPECTED_FILE_PACKAGING_PREFIX + "${EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX}") + elseif(NOT DEFINED EXPECTED_FILE_PACKAGING_PREFIX) + # default CPackRPM packaging install prefix + set(EXPECTED_FILE_PACKAGING_PREFIX "/usr") endif() + set(prepared_ "${EXPECTED_FILE_PACKAGING_PREFIX}") + foreach(part_ IN LISTS ${CONTENT_VAR}) + list(APPEND prepared_ "${EXPECTED_FILE_PACKAGING_PREFIX}${part_}") + endforeach() + # remove paths that are excluded from auto packaging + if(NOT DEFINED CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST) + set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST + /etc /etc/init.d /usr /usr/bin /usr/include /usr/lib + /usr/libx32 /usr/lib64 /usr/share /usr/share/aclocal /usr/share/doc) + endif() unset(filtered_) - foreach(part_ IN LISTS ${CONTENT_VAR}) + foreach(part_ IN LISTS prepared_) unset(dont_add_) - foreach(for_removal_ IN LISTS TEST_INSTALL_PREFIX_PATHS) + foreach(for_removal_ IN LISTS CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST) if(part_ STREQUAL for_removal_) set(dont_add_ TRUE) break() diff --git a/Tests/RunCMake/CPack/STGZ/Helpers.cmake b/Tests/RunCMake/CPack/STGZ/Helpers.cmake index 68b1eab..1756645 100644 --- a/Tests/RunCMake/CPack/STGZ/Helpers.cmake +++ b/Tests/RunCMake/CPack/STGZ/Helpers.cmake @@ -47,18 +47,29 @@ function(toExpectedContentList FILE_NO CONTENT_VAR) string(SUBSTRING "${prefix_}" 0 ${pos_} prefix_) endif() - if(NOT DEFINED TEST_MAIN_INSTALL_PREFIX_PATH) - set(TEST_MAIN_INSTALL_PREFIX_PATH "/usr") + # add install prefix to expected paths + if(DEFINED EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX) + set(EXPECTED_FILE_PACKAGING_PREFIX + "${EXPECTED_FILE_${FILE_NO}_PACKAGING_PREFIX}") + elseif(NOT DEFINED EXPECTED_FILE_PACKAGING_PREFIX) + # default CPack Archive packaging install prefix + set(EXPECTED_FILE_PACKAGING_PREFIX "/") endif() - set(filtered_ "${prefix_}") - foreach(part_ IN LISTS ${CONTENT_VAR}) - string(REGEX REPLACE "^${TEST_MAIN_INSTALL_PREFIX_PATH}(/|$)" "" part_ "${part_}") + # remove trailing slash otherwise path concatenation will cause double slashes + string(REGEX REPLACE "/$" "" EXPECTED_FILE_PACKAGING_PREFIX + "${EXPECTED_FILE_PACKAGING_PREFIX}") + + if(EXPECTED_FILE_PACKAGING_PREFIX) + set(prepared_ "${prefix_}") + else() + unset(prepared_) + endif() - if(part_) - list(APPEND filtered_ "${prefix_}/${part_}") - endif() + list(APPEND prepared_ "${prefix_}${EXPECTED_FILE_PACKAGING_PREFIX}") + foreach(part_ IN LISTS ${CONTENT_VAR}) + list(APPEND prepared_ "${prefix_}${EXPECTED_FILE_PACKAGING_PREFIX}${part_}") endforeach() - set(${CONTENT_VAR} "${filtered_}" PARENT_SCOPE) + set(${CONTENT_VAR} "${prepared_}" PARENT_SCOPE) endfunction() diff --git a/Tests/RunCMake/CPack/tests/CPACK_INSTALL_SCRIPT/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_SCRIPT/ExpectedFiles.cmake index 5cb12c3..02a7821 100644 --- a/Tests/RunCMake/CPack/tests/CPACK_INSTALL_SCRIPT/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/CPACK_INSTALL_SCRIPT/ExpectedFiles.cmake @@ -1,3 +1,3 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/abc.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/abc.txt") diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake index 694dc00..6d895ec 100644 --- a/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/CUSTOM_BINARY_SPEC_FILE/ExpectedFiles.cmake @@ -1,9 +1,9 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") if(PACKAGING_TYPE STREQUAL "COMPONENT") set(EXPECTED_FILES_COUNT "2") set(EXPECTED_FILE_1_COMPONENT "test") set(EXPECTED_FILE_2_COMPONENT "test2") - set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") + set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") endif() diff --git a/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake index 5cb280c..07226df 100644 --- a/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/CUSTOM_NAMES/ExpectedFiles.cmake @@ -1,10 +1,10 @@ set(EXPECTED_FILES_COUNT "3") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) set(EXPECTED_FILE_1_COMPONENT "pkg_1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") set(EXPECTED_FILE_2_NAME "second") -set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") -set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_2_LIST "/foo;/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_3_LIST "/foo;/foo/CMakeLists.txt") if(GENERATOR_TYPE STREQUAL "DEB" OR GENERATOR_TYPE STREQUAL "RPM") string(TOLOWER "${GENERATOR_TYPE}" file_extension_) diff --git a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake index 3d8de74..b26c6c7 100644 --- a/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEBUGINFO/ExpectedFiles.cmake @@ -5,11 +5,11 @@ set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) set(EXPECTED_FILE_1_NAME "Debuginfo") set(EXPECTED_FILE_1_COMPONENT "applications") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/test_prog") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") set(EXPECTED_FILE_2 "TestDinfo-pkg*-headers.rpm") -set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") set(EXPECTED_FILE_3 "TestDinfo-pkg*-libs.rpm") -set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/bas;/usr/bas/libtest_lib.so") +set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so") set(EXPECTED_FILE_4_NAME "Debuginfo") set(EXPECTED_FILE_4_COMPONENT "applications-debuginfo") diff --git a/Tests/RunCMake/CPack/tests/DEB_PACKAGE_VERSION_BACK_COMPATIBILITY/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEB_PACKAGE_VERSION_BACK_COMPATIBILITY/ExpectedFiles.cmake index 6142eb3..d1a3a5f 100644 --- a/Tests/RunCMake/CPack/tests/DEB_PACKAGE_VERSION_BACK_COMPATIBILITY/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEB_PACKAGE_VERSION_BACK_COMPATIBILITY/ExpectedFiles.cmake @@ -1,2 +1,2 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/ExpectedFiles.cmake index 9b8205b..b6fcc17 100644 --- a/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEFAULT_PERMISSIONS/ExpectedFiles.cmake @@ -2,5 +2,5 @@ if(${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid_.*_var") set(EXPECTED_FILES_COUNT "0") else() set(EXPECTED_FILES_COUNT "1") - set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") + set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") endif() diff --git a/Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake index 3b280ba..be7ba07 100644 --- a/Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DEPENDENCIES/ExpectedFiles.cmake @@ -1,14 +1,14 @@ set(EXPECTED_FILES_COUNT "5") set(EXPECTED_FILE_1_COMPONENT "applications") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/test_prog") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") set(EXPECTED_FILE_2_COMPONENT "applications_auto") -set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/foo_auto;/usr/foo_auto/test_prog") +set(EXPECTED_FILE_CONTENT_2_LIST "/foo_auto;/foo_auto/test_prog") set(EXPECTED_FILE_3_COMPONENT "headers") -set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_3_LIST "/bar;/bar/CMakeLists.txt") set(EXPECTED_FILE_4_COMPONENT "libs") -set(EXPECTED_FILE_CONTENT_4_LIST "/usr/bas;/usr/bas/libtest_lib.so") +set(EXPECTED_FILE_CONTENT_4_LIST "/bas;/bas/libtest_lib.so") set(EXPECTED_FILE_5_COMPONENT "libs_auto") -set(EXPECTED_FILE_CONTENT_5_LIST "/usr;/usr/bas_auto;/usr/bas_auto/libtest_lib.so") +set(EXPECTED_FILE_CONTENT_5_LIST "/bas_auto;/bas_auto/libtest_lib.so") if(GENERATOR_TYPE STREQUAL "DEB") set(whitespaces_ "[\t\n\r ]*") diff --git a/Tests/RunCMake/CPack/tests/DIST/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/DIST/ExpectedFiles.cmake index 6142eb3..d1a3a5f 100644 --- a/Tests/RunCMake/CPack/tests/DIST/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/DIST/ExpectedFiles.cmake @@ -1,2 +1,2 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake index 650687c..8df6831 100644 --- a/Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/EMPTY_DIR/ExpectedFiles.cmake @@ -1,6 +1,6 @@ set(EXPECTED_FILES_COUNT "1") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/empty") +set(EXPECTED_FILE_CONTENT_1_LIST "/empty") if(PACKAGING_TYPE STREQUAL "COMPONENT") set(EXPECTED_FILE_1_COMPONENT "test") diff --git a/Tests/RunCMake/CPack/tests/EXTRA/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/EXTRA/ExpectedFiles.cmake index ded2923..407cbe6 100644 --- a/Tests/RunCMake/CPack/tests/EXTRA/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/EXTRA/ExpectedFiles.cmake @@ -1,8 +1,8 @@ set(EXPECTED_FILES_COUNT "3") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) set(EXPECTED_FILE_1_COMPONENT "foo") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") set(EXPECTED_FILE_2_COMPONENT "bar") -set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") set(EXPECTED_FILE_3_COMPONENT "bas") -set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/bas;/usr/bas/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake index a45b38d..974df22 100644 --- a/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/EXTRA_SLASH_IN_PATH/ExpectedFiles.cmake @@ -2,6 +2,7 @@ set(whitespaces_ "[\t\n\r ]*") set(EXPECTED_FILES_COUNT "5") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) +set(EXPECTED_FILE_PACKAGING_PREFIX "") set(EXPECTED_FILE_1_COMPONENT "applications") set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") diff --git a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake index 44346ab..de38df9 100644 --- a/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/INSTALL_SCRIPTS/ExpectedFiles.cmake @@ -1,5 +1,5 @@ set(EXPECTED_FILES_COUNT "2") set(EXPECTED_FILE_1_COMPONENT "foo") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") set(EXPECTED_FILE_2_COMPONENT "bar") -set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake index 631d957..4cb8dd0 100644 --- a/Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/LONG_FILENAMES/ExpectedFiles.cmake @@ -1,3 +1,3 @@ set(EXPECTED_FILES_COUNT "1") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/llllllllll_oooooooooo_nnnnnnnnnn_gggggggggg_ffffffffff_iiiiiiiiii_llllllllll_eeeeeeeeee_nnnnnnnnnn_aaaaaaaaaa_mmmmmmmmmm_eeeeeeeeee.txt") diff --git a/Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake index 6bfb0c1..629be9e 100644 --- a/Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/MAIN_COMPONENT/ExpectedFiles.cmake @@ -3,9 +3,9 @@ set(EXPECTED_FILES_COUNT "0") if(NOT RunCMake_SUBTEST_SUFFIX STREQUAL "invalid") set(EXPECTED_FILES_COUNT "3") set(EXPECTED_FILE_1 "main_component-0.1.1-1.*.rpm") - set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") + set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") set(EXPECTED_FILE_2_COMPONENT "headers") - set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") + set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") set(EXPECTED_FILE_3_COMPONENT "libs") - set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/bas;/usr/bas/CMakeLists.txt") + set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/CMakeLists.txt") endif() diff --git a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake index 6142eb3..d1a3a5f 100644 --- a/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/MD5SUMS/ExpectedFiles.cmake @@ -1,2 +1,2 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake index 6142eb3..d1a3a5f 100644 --- a/Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/MINIMAL/ExpectedFiles.cmake @@ -1,2 +1,2 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake index eed5b92..c375aca 100644 --- a/Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/PACKAGE_CHECKSUM/ExpectedFiles.cmake @@ -2,5 +2,5 @@ set(EXPECTED_FILES_COUNT "0") if(NOT ${RunCMake_SUBTEST_SUFFIX} MATCHES "invalid") set(EXPECTED_FILES_COUNT "1") - set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") + set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") endif() diff --git a/Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake index ae58c4b..137da47 100644 --- a/Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/PARTIALLY_RELOCATABLE_WARNING/ExpectedFiles.cmake @@ -1,2 +1,4 @@ set(EXPECTED_FILES_COUNT "1") +# don't set the prefix here as we have absolute paths that should not be prefixed +set(EXPECTED_FILE_PACKAGING_PREFIX "") set(EXPECTED_FILE_CONTENT_1_LIST "/not_relocatable;/not_relocatable/CMakeLists.txt;/opt") diff --git a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake index 9bdb176..26fa1df 100644 --- a/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/PER_COMPONENT_FIELDS/ExpectedFiles.cmake @@ -1,8 +1,8 @@ set(EXPECTED_FILES_COUNT "3") set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) set(EXPECTED_FILE_1_COMPONENT "pkg_1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") set(EXPECTED_FILE_2_NAME "second") -set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_2_LIST "/foo;/foo/CMakeLists.txt") set(EXPECTED_FILE_3_COMPONENT "pkg_3") -set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_3_LIST "/foo;/foo/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake index ca866ea..8170d39 100644 --- a/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/SINGLE_DEBUGINFO/ExpectedFiles.cmake @@ -5,25 +5,25 @@ set(EXPECTED_FILES_NAME_GENERATOR_SPECIFIC_FORMAT TRUE) if(RunCMake_SUBTEST_SUFFIX STREQUAL "valid" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_debuginfo") set(EXPECTED_FILES_COUNT "4") set(EXPECTED_FILE_1 "single_debuginfo-0.1.1-1.*.rpm") - set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/test_prog") + set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") set(EXPECTED_FILE_2 "single_debuginfo*-headers.rpm") - set(EXPECTED_FILE_CONTENT_2_LIST "/usr;/usr/bar;/usr/bar/CMakeLists.txt") + set(EXPECTED_FILE_CONTENT_2_LIST "/bar;/bar/CMakeLists.txt") set(EXPECTED_FILE_3 "single_debuginfo*-libs.rpm") - set(EXPECTED_FILE_CONTENT_3_LIST "/usr;/usr/bas;/usr/bas/libtest_lib.so") + set(EXPECTED_FILE_CONTENT_3_LIST "/bas;/bas/libtest_lib.so") set(EXPECTED_FILE_4_COMPONENT "debuginfo") set(EXPECTED_FILE_CONTENT_4 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp${whitespaces_}/src/src_1/test_lib.cpp.*") elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component" OR RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_no_debuginfo") set(EXPECTED_FILES_COUNT "2") set(EXPECTED_FILE_1 "single_debuginfo-0*-applications.rpm") - set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/test_prog") + set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") set(EXPECTED_FILE_2 "single_debuginfo-applications-debuginfo*.rpm") set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") elseif(RunCMake_SUBTEST_SUFFIX STREQUAL "one_component_main" OR RunCMake_SUBTEST_SUFFIX STREQUAL "no_components") set(EXPECTED_FILES_COUNT "2") set(EXPECTED_FILE_1 "single_debuginfo-0*.rpm") - set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/test_prog") + set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/test_prog") set(EXPECTED_FILE_2 "single_debuginfo-debuginfo*.rpm") set(EXPECTED_FILE_CONTENT_2 ".*/src${whitespaces_}/src/src_1${whitespaces_}/src/src_1/main.cpp.*") diff --git a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake index 0a3e426..d78f222 100644 --- a/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/SOURCE_PACKAGE/ExpectedFiles.cmake @@ -1,2 +1,3 @@ set(EXPECTED_FILES_COUNT "1") +set(EXPECTED_FILE_PACKAGING_PREFIX "") set(EXPECTED_FILE_CONTENT_1_LIST "source_package-0.1.1.tar.gz;source_package.spec") diff --git a/Tests/RunCMake/CPack/tests/SUGGESTS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SUGGESTS/ExpectedFiles.cmake index 6142eb3..d1a3a5f 100644 --- a/Tests/RunCMake/CPack/tests/SUGGESTS/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/SUGGESTS/ExpectedFiles.cmake @@ -1,2 +1,2 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") diff --git a/Tests/RunCMake/CPack/tests/SYMLINKS/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/SYMLINKS/ExpectedFiles.cmake index 05be748..e8281a8 100644 --- a/Tests/RunCMake/CPack/tests/SYMLINKS/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/SYMLINKS/ExpectedFiles.cmake @@ -1,12 +1,11 @@ set(EXPECTED_FILES_COUNT "1") set(EXPECTED_FILE_CONTENT_1_LIST - "/usr" - "/usr/empty_dir" - "/usr/non_empty_dir" - "/usr/non_empty_dir/CMakeLists.txt" - "/usr/symlink_to_empty_dir" - "/usr/symlink_to_non_empty_dir") + "/empty_dir" + "/non_empty_dir" + "/non_empty_dir/CMakeLists.txt" + "/symlink_to_empty_dir" + "/symlink_to_non_empty_dir") if(PACKAGING_TYPE STREQUAL "COMPONENT") set(EXPECTED_FILE_1_COMPONENT "links") diff --git a/Tests/RunCMake/CPack/tests/USER_FILELIST/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/USER_FILELIST/ExpectedFiles.cmake index aabe537..8420986 100644 --- a/Tests/RunCMake/CPack/tests/USER_FILELIST/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/USER_FILELIST/ExpectedFiles.cmake @@ -1,2 +1,2 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr/one;/usr/one/foo.txt;/usr/one/two;/usr/one/two/bar.txt;/usr/three;/usr/three/baz.txt;/usr/three/qux.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/one;/one/foo.txt;/one/two;/one/two/bar.txt;/three;/three/baz.txt;/three/qux.txt") diff --git a/Tests/RunCMake/CPack/tests/VERSION/ExpectedFiles.cmake b/Tests/RunCMake/CPack/tests/VERSION/ExpectedFiles.cmake index 85c571c..372f71b 100644 --- a/Tests/RunCMake/CPack/tests/VERSION/ExpectedFiles.cmake +++ b/Tests/RunCMake/CPack/tests/VERSION/ExpectedFiles.cmake @@ -1,3 +1,3 @@ set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_CONTENT_1_LIST "/usr;/usr/foo;/usr/foo/CMakeLists.txt") +set(EXPECTED_FILE_CONTENT_1_LIST "/foo;/foo/CMakeLists.txt") set(EXPECTED_FILE_1_REVISION "1") |