summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack/DEB
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-11-26 19:37:07 (GMT)
committerDomen Vrankar <domen.vrankar@gmail.com>2016-11-27 22:20:35 (GMT)
commit8575affa4c72e1c0d07f964d2f28eb6ddbadb291 (patch)
treec3a77601235a27d120bc983cbc56cdc493d7aa26 /Tests/RunCMake/CPack/DEB
parent79443e1b8b604de00d269e73a977f449bc3fcef2 (diff)
downloadCMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.zip
CMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.tar.gz
CMake-8575affa4c72e1c0d07f964d2f28eb6ddbadb291.tar.bz2
Tests: CPack test move and merge VerifyResult
Merge VerifyResult of different generators pertest and move the file to its test dir.
Diffstat (limited to 'Tests/RunCMake/CPack/DEB')
-rw-r--r--Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake18
-rw-r--r--Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-VerifyResult.cmake4
-rw-r--r--Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-VerifyResult.cmake8
-rw-r--r--Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake34
-rw-r--r--Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake26
-rw-r--r--Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake18
6 files changed, 0 insertions, 108 deletions
diff --git a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
deleted file mode 100644
index 85e137f..0000000
--- a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-set(foo_preinst "^echo default_preinst$")
-# NOTE: optional dot at the end of permissions regex is for SELinux enabled systems
-set(foo_preinst_permissions_regex "-rwxr-xr-x\.? .*")
-set(foo_prerm "^echo default_prerm$")
-set(foo_prerm_permissions_regex "-rwxr-xr-x\.? .*")
-verifyDebControl("${FOUND_FILE_1}" "foo" "preinst;prerm")
-
-set(bar_preinst "^echo bar_preinst$")
-set(bar_preinst_permissions_regex "-rwx------\.? .*")
-set(bar_prerm "^echo bar_prerm$")
-set(bar_prerm_permissions_regex "-rwx------\.? .*")
-verifyDebControl("${FOUND_FILE_2}" "bar" "preinst;prerm")
-
-set(bas_preinst "^echo default_preinst$")
-set(bas_preinst_permissions_regex "-rwxr-xr-x\.? .*")
-set(bas_prerm "^echo default_prerm$")
-set(bas_prerm_permissions_regex "-rwxr-xr-x\.? .*")
-verifyDebControl("${FOUND_FILE_3}" "bas" "preinst;prerm")
diff --git a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-VerifyResult.cmake
deleted file mode 100644
index f5d97db..0000000
--- a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-VerifyResult.cmake
+++ /dev/null
@@ -1,4 +0,0 @@
-set(shlibs_shlibs "^libtest_lib 0\\.8 deb_generate_shlibs \\(\\= 0\\.1\\.1\\)\n$")
-# optional dot at the end of permissions regex is for SELinux enabled systems
-set(shlibs_shlibs_permissions_regex "-rw-r--r--\.? .*")
-verifyDebControl("${FOUND_FILE_1}" "shlibs" "shlibs")
diff --git a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-VerifyResult.cmake
deleted file mode 100644
index 320732b..0000000
--- a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-VerifyResult.cmake
+++ /dev/null
@@ -1,8 +0,0 @@
-set(shlibs_shlibs "^libtest_lib 0\\.8 deb_generate_shlibs_ldconfig \\(>\\= 0\\.1\\.1\\)\n$")
-# NOTE: optional dot at the end of permissions regex is for SELinux enabled systems
-set(shlibs_shlibs_permissions_regex "-rw-r--r--\.? .*")
-set(shlibs_postinst ".*ldconfig.*")
-set(shlibs_postinst_permissions_regex "-rwxr-xr-x\.? .*")
-set(shlibs_postrm ".*ldconfig.*")
-set(shlibs_postrm_permissions_regex "-rwxr-xr-x\.? .*")
-verifyDebControl("${FOUND_FILE_1}" "shlibs" "shlibs;postinst;postrm")
diff --git a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake
deleted file mode 100644
index ba39f2e..0000000
--- a/Tests/RunCMake/CPack/DEB/DEPENDENCIES-VerifyResult.cmake
+++ /dev/null
@@ -1,34 +0,0 @@
-function(checkDependencies_ FILE REGEX)
- set(whitespaces_ "[\t\n\r ]*")
-
- getPackageInfo("${FILE}" "FILE_INFO_")
- if(NOT FILE_INFO_ MATCHES "${REGEX}")
- message(FATAL_ERROR "Unexpected dependencies in '${FILE}'; file info: '${FILE_INFO_}'")
- endif()
-endfunction()
-
-foreach(dependency_type_ DEPENDS CONFLICTS ENHANCES BREAKS REPLACES RECOMMENDS SUGGESTS)
- string(TOLOWER "${dependency_type_}" lower_dependency_type_)
- string(SUBSTRING ${lower_dependency_type_} 1 -1 lower_dependency_type_tail_)
- string(SUBSTRING ${dependency_type_} 0 1 dependency_type_head_)
- set(dependency_type_name_ "${dependency_type_head_}${lower_dependency_type_tail_}")
-
- checkDependencies_("${FOUND_FILE_1}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b.*")
- checkDependencies_("${FOUND_FILE_2}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}.*${lower_dependency_type_}-application, ${lower_dependency_type_}-application-b.*")
- checkDependencies_("${FOUND_FILE_3}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-headers.*")
- checkDependencies_("${FOUND_FILE_4}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-default, ${lower_dependency_type_}-default-b.*")
- checkDependencies_("${FOUND_FILE_5}" ".*${dependency_type_name_}${whitespaces_}:${whitespaces_}${lower_dependency_type_}-default, ${lower_dependency_type_}-default-b.*")
-endforeach()
-
-checkDependencies_("${FOUND_FILE_1}" ".*Provides${whitespaces_}:${whitespaces_}provided-default, provided-default-b")
-checkDependencies_("${FOUND_FILE_2}" ".*Provides${whitespaces_}:${whitespaces_}provided-default, provided-default-b")
-checkDependencies_("${FOUND_FILE_3}" ".*Provides${whitespaces_}:${whitespaces_}provided-default, provided-default-b")
-checkDependencies_("${FOUND_FILE_4}" ".*Provides${whitespaces_}:${whitespaces_}provided-lib.*")
-checkDependencies_("${FOUND_FILE_5}" ".*Provides${whitespaces_}:${whitespaces_}provided-lib_auto.*, provided-lib_auto-b.*")
-
-# PREDEPENDS
-checkDependencies_("${FOUND_FILE_1}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-application, predepends-application-b.*")
-checkDependencies_("${FOUND_FILE_2}" ".*Pre-Depends${whitespaces_}:${whitespaces_}.*predepends-application, predepends-application-b.*")
-checkDependencies_("${FOUND_FILE_3}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-headers.*")
-checkDependencies_("${FOUND_FILE_4}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-default, predepends-default-b.*")
-checkDependencies_("${FOUND_FILE_5}" ".*Pre-Depends${whitespaces_}:${whitespaces_}predepends-default, predepends-default-b.*")
diff --git a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake
deleted file mode 100644
index 0452343..0000000
--- a/Tests/RunCMake/CPack/DEB/LONG_FILENAMES-VerifyResult.cmake
+++ /dev/null
@@ -1,26 +0,0 @@
-# create structure required by non root dpkg install
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir")
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir")
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/updates")
-file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/info")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/available" "")
-file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir/status" "")
-
-# some programs used by fakeroot require sbin in path so we should not
-# leave this to chance (programs: ldconfig and start-stop-daemon)
-set(ENV{PATH} "$ENV{PATH}:/usr/local/sbin:/usr/sbin:/sbin")
-
-execute_process(COMMAND ${FAKEROOT_EXECUTABLE} ${DPKG_EXECUTABLE}
- -i --force-not-root --root=${CMAKE_CURRENT_BINARY_DIR}/root_dir
- --admindir=${CMAKE_CURRENT_BINARY_DIR}/root_dir/admindir
- --log=${CMAKE_CURRENT_BINARY_DIR}/root_dir/dpkg.log
- ${FOUND_FILE_1}
- RESULT_VARIABLE install_result_
- ERROR_VARIABLE install_error_
- OUTPUT_QUIET
- )
-
-if(install_result_)
- message(FATAL_ERROR "LONG_FILENAMES package error - result:"
- " '${install_result_}'; text: '${install_error_}'")
-endif()
diff --git a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake
deleted file mode 100644
index 0f69925..0000000
--- a/Tests/RunCMake/CPack/DEB/PER_COMPONENT_FIELDS-VerifyResult.cmake
+++ /dev/null
@@ -1,18 +0,0 @@
-function(checkPackageInfo_ TYPE FILE REGEX)
- set(whitespaces_ "[\t\n\r ]*")
-
- getPackageInfo("${FILE}" "FILE_INFO_")
- if(NOT FILE_INFO_ MATCHES "${REGEX}")
- message(FATAL_ERROR "Unexpected ${TYPE} in '${FILE}'; file info: '${FILE_INFO_}'")
- endif()
-endfunction()
-
-# check package name
-checkPackageInfo_("name" "${FOUND_FILE_1}" ".*Package${whitespaces_}:${whitespaces_}per_component_fields-pkg_1")
-checkPackageInfo_("name" "${FOUND_FILE_2}" ".*Package${whitespaces_}:${whitespaces_}second")
-checkPackageInfo_("name" "${FOUND_FILE_3}" ".*Package${whitespaces_}:${whitespaces_}per_component_fields-pkg_3")
-
-# check package group
-checkPackageInfo_("group" "${FOUND_FILE_1}" ".*Section${whitespaces_}:${whitespaces_}default")
-checkPackageInfo_("group" "${FOUND_FILE_2}" ".*Section${whitespaces_}:${whitespaces_}second_group")
-checkPackageInfo_("group" "${FOUND_FILE_3}" ".*Section${whitespaces_}:${whitespaces_}default")