summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPack
diff options
context:
space:
mode:
authorDomen Vrankar <domen.vrankar@gmail.com>2016-06-19 20:19:56 (GMT)
committerBrad King <brad.king@kitware.com>2016-06-20 13:29:11 (GMT)
commit302391bae6a79a4770cbece3f6c12f8140890a00 (patch)
tree8a4be4838825862380a5bfc781f56cd6e27a5f7d /Tests/RunCMake/CPack
parent9f3546bbb44e23b97ea226fce155330eb352f75b (diff)
downloadCMake-302391bae6a79a4770cbece3f6c12f8140890a00.zip
CMake-302391bae6a79a4770cbece3f6c12f8140890a00.tar.gz
CMake-302391bae6a79a4770cbece3f6c12f8140890a00.tar.bz2
CPack/Deb: Fix tests for SELinux-enabled systems
Suggested-by: Patrick <mail6543210@yahoo.com.tw>
Diffstat (limited to 'Tests/RunCMake/CPack')
-rw-r--r--Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake13
-rw-r--r--Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-VerifyResult.cmake3
-rw-r--r--Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-VerifyResult.cmake7
3 files changed, 13 insertions, 10 deletions
diff --git a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
index 5f929ff..5b6ae73 100644
--- a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
@@ -1,17 +1,18 @@
set(foo_preinst "^echo default_preinst$")
-set(foo_preinst_permissions_regex "-rwxr-xr-x .*")
+# 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 .*")
+set(foo_prerm_permissions_regex "-rwxr-xr-x\.? .*")
verifyDebControl("${FOUND_FILE_1}" "foo" "preinst;prerm")
set(bar_preinst "^echo bar_preinst$")
-set(bar_prerm_permissions_regex "-rwx------ .*")
+set(bar_prerm_permissions_regex "-rwx------\.? .*")
set(bar_prerm "^echo bar_prerm$")
-set(bar_prerm_permissions_regex "-rwx------ .*")
+set(bar_prerm_permissions_regex "-rwx------\.? .*")
verifyDebControl("${FOUND_FILE_2}" "bar" "preinst;prerm")
set(bas_preinst "^echo default_preinst$")
-set(bas_prerm_permissions_regex "-rwxr-xr-x .*")
+set(bas_prerm_permissions_regex "-rwxr-xr-x\.? .*")
set(bas_prerm "^echo default_prerm$")
-set(bas_prerm_permissions_regex "-rwxr-xr-x .*")
+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
index 8ccb628..b1952ef 100644
--- a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS-VerifyResult.cmake
@@ -1,3 +1,4 @@
set(shlibs_shlibs "^libtest_lib 0\\.8 generate_shlibs \\(\\= 0\\.1\\.1\\)\n$")
-set(shlibs_shlibs_permissions_regex "-rw-r--r-- .*")
+# 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
index d04c641..422cfbe 100644
--- a/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/DEB_GENERATE_SHLIBS_LDCONFIG-VerifyResult.cmake
@@ -1,7 +1,8 @@
set(shlibs_shlibs "^libtest_lib 0\\.8 generate_shlibs_ldconfig \\(>\\= 0\\.1\\.1\\)\n$")
-set(shlibs_shlibs_permissions_regex "-rw-r--r-- .*")
+# 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_postinst_permissions_regex "-rwxr-xr-x\.? .*")
set(shlibs_postrm ".*ldconfig.*")
-set(shlibs_postrm_permissions_regex "-rwxr-xr-x .*")
+set(shlibs_postrm_permissions_regex "-rwxr-xr-x\.? .*")
verifyDebControl("${FOUND_FILE_1}" "shlibs" "shlibs;postinst;postrm")