Hi there,

Here're two trivial patches for testing of CPack/DEB.

One is for building cmake on SELinux-enabled system, and other is for a
typo in the same file form the former one.

These patches is based on commit 83ae7944

First patch:

When building cmake on an SELinux-enabled system, there will be an extra
dot at the end of permission field of `ls -l` like this:
-rwxrwxrwx.
          ^ this dot
This makes the testing RunCMake.CPack_DEB fail.

This patch add an optional dot in the regex to fix it.

Second patch:

Fix typos in testing data. This bug causes two variable undefined.
Since "result" MATCHES "${expected_but_undefined_variable}" returns true,
this bug has no effect.

BR,
Patrick
From 8e642969249961aa415ba43e85814e962ebc7ef5 Mon Sep 17 00:00:00 2001
From: mail6543210 <mail6543...@yahoo.com.tw>
Date: Thu, 16 Jun 2016 17:18:40 +0800
Subject: [PATCH 1/2] Enable building on SELinux-enabled system

---
 Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
index 5f929ff..ffc795d 100644
--- a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
@@ -1,17 +1,17 @@
 set(foo_preinst "^echo default_preinst$")
-set(foo_preinst_permissions_regex "-rwxr-xr-x .*")
+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")
-- 
1.9.1

From 3bf160c4ea4e88858584435a0fa8c83a5702ff4e Mon Sep 17 00:00:00 2001
From: mail6543210 <mail6543...@yahoo.com.tw>
Date: Thu, 16 Jun 2016 17:29:40 +0800
Subject: [PATCH 2/2] Fix typos of testing data in CPack/DEB

---
 Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
index ffc795d..1a63e1d 100644
--- a/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
+++ b/Tests/RunCMake/CPack/DEB/DEB_EXTRA-VerifyResult.cmake
@@ -5,13 +5,13 @@ 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_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_prerm_permissions_regex "-rwxr-xr-x.? .*")
+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")
-- 
1.9.1

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to