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
This commit is contained in:
Brad King 2017-11-20 15:09:05 +00:00 committed by Kitware Robot
commit 66b37132b6
33 changed files with 153 additions and 69 deletions

View File

@ -338,7 +338,7 @@ function(cpack_encode_variables)
set(value "${${var}}")
endif()
string(APPEND commands "\nSET(${var} \"${value}\")")
string(APPEND commands "\nset(${var} \"${value}\")")
endif()
endforeach()

View File

@ -66,7 +66,7 @@
# the component differently depending on the value of this variable:
#
# * ONE_PER_GROUP (default): creates one package file per component group
# * ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) component
# * ALL_COMPONENTS_IN_ONE : creates a single package with all (requested) components
# * IGNORE : creates one package per component, i.e. IGNORE component group
#
# One can specify different grouping for different CPack generator by

View File

@ -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_}")

View File

@ -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()

View File

@ -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)

View File

@ -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:

View File

@ -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()
unset(filtered_)
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 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()

View File

@ -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(part_)
list(APPEND filtered_ "${prefix_}/${part_}")
endif()
if(EXPECTED_FILE_PACKAGING_PREFIX)
set(prepared_ "${prefix_}")
else()
unset(prepared_)
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()

View File

@ -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")

View File

@ -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()

View File

@ -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_)

View File

@ -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")

View File

@ -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")

View File

@ -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()

View File

@ -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 ]*")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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()

View File

@ -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")

View File

@ -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")

View File

@ -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()

View File

@ -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")

View File

@ -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")

View File

@ -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.*")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")

View File

@ -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")