summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-22 14:47:11 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-09-22 14:47:11 (GMT)
commit442d17ef6c50a3ffc83ed6a860dc05febd85f1b4 (patch)
treecffd3ac5ce17204ab7430db4438046c0a0ead2cd /Tests
parentfcd9f85660bb0de569a5a5770b98eb7d922fbd6b (diff)
parentb58de9fe2ba4ac3e194403ecd118fd54681ffae8 (diff)
downloadCMake-442d17ef6c50a3ffc83ed6a860dc05febd85f1b4.zip
CMake-442d17ef6c50a3ffc83ed6a860dc05febd85f1b4.tar.gz
CMake-442d17ef6c50a3ffc83ed6a860dc05febd85f1b4.tar.bz2
Merge topic 'cpack-package-empty-dirs'
b58de9fe CPack: allow packaging of empty directories 47b060ae CPackDeb: allow empty directories in component packages
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CPackComponentsDEB/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/CPack/CMakeLists.txt2
-rw-r--r--Tests/RunCMake/CPack/COMPONENTS_EMPTY_DIR.cmake5
-rw-r--r--Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake5
-rw-r--r--Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake2
-rw-r--r--Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake5
-rw-r--r--Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake1
-rw-r--r--Tests/RunCMake/CPack/EMPTY_DIR.cmake4
-rw-r--r--Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake5
-rw-r--r--Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-stderr.txt1
-rw-r--r--Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake5
-rw-r--r--Tests/RunCMake/CPack/RPM/EMPTY_DIR-stderr.txt1
-rw-r--r--Tests/RunCMake/CPack/RunCMakeTest.cmake2
13 files changed, 38 insertions, 3 deletions
diff --git a/Tests/CPackComponentsDEB/CMakeLists.txt b/Tests/CPackComponentsDEB/CMakeLists.txt
index 98ed911..093b23f 100644
--- a/Tests/CPackComponentsDEB/CMakeLists.txt
+++ b/Tests/CPackComponentsDEB/CMakeLists.txt
@@ -110,9 +110,8 @@ install(FILES ${CPackComponentsDEB_BINARY_DIR}/symtest
if(EXISTS "./dirtest")
execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ./dirtest)
endif()
+# NOTE: directory left empty on purpose
execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ./dirtest)
-# BUG: apparently cannot add an empty directory
-execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../mylibapp ./dirtest/symtest)
# NOTE: we should not add the trailing "/" to dirtest
install(DIRECTORY ${CPackComponentsDEB_BINARY_DIR}/dirtest
DESTINATION bin/
diff --git a/Tests/RunCMake/CPack/CMakeLists.txt b/Tests/RunCMake/CPack/CMakeLists.txt
index 46f1367..449172a 100644
--- a/Tests/RunCMake/CPack/CMakeLists.txt
+++ b/Tests/RunCMake/CPack/CMakeLists.txt
@@ -8,5 +8,5 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${GENERATOR_TYPE}/${RunCMake_TEST}-specif
include("${GENERATOR_TYPE}/${RunCMake_TEST}-specifics.cmake")
endif()
-set(CPACK_GENERATOR "${GENERATOR_TYPE}")
+set(CPACK_GENERATOR "${GENERATOR_TYPE};TGZ")
include(CPack)
diff --git a/Tests/RunCMake/CPack/COMPONENTS_EMPTY_DIR.cmake b/Tests/RunCMake/CPack/COMPONENTS_EMPTY_DIR.cmake
new file mode 100644
index 0000000..7210e7d
--- /dev/null
+++ b/Tests/RunCMake/CPack/COMPONENTS_EMPTY_DIR.cmake
@@ -0,0 +1,5 @@
+set(CPACK_COMPONENTS_ALL test)
+install(DIRECTORY DESTINATION empty
+ COMPONENT test)
+
+set(CPACK_PACKAGE_NAME "components_empty_dir")
diff --git a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake
new file mode 100644
index 0000000..5adca68
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake
@@ -0,0 +1,5 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_1 "components_empty_dir*.deb")
+set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$")
diff --git a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake
new file mode 100644
index 0000000..2720fe9
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake
@@ -0,0 +1,2 @@
+set(CPACK_PACKAGE_CONTACT "someone")
+set(CPACK_DEB_COMPONENT_INSTALL "ON")
diff --git a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake
new file mode 100644
index 0000000..1552a36
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake
@@ -0,0 +1,5 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_1 "empty_dir*.deb")
+set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$")
diff --git a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake
new file mode 100644
index 0000000..8821ab9
--- /dev/null
+++ b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake
@@ -0,0 +1 @@
+set(CPACK_PACKAGE_CONTACT "someone")
diff --git a/Tests/RunCMake/CPack/EMPTY_DIR.cmake b/Tests/RunCMake/CPack/EMPTY_DIR.cmake
new file mode 100644
index 0000000..023ba17
--- /dev/null
+++ b/Tests/RunCMake/CPack/EMPTY_DIR.cmake
@@ -0,0 +1,4 @@
+install(DIRECTORY DESTINATION empty
+ COMPONENT test)
+
+set(CPACK_PACKAGE_NAME "empty_dir")
diff --git a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake
new file mode 100644
index 0000000..d396276
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake
@@ -0,0 +1,5 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_1 "components_empty_dir*.rpm")
+set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$")
diff --git a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-stderr.txt b/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-stderr.txt
new file mode 100644
index 0000000..6ddca12
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-stderr.txt
@@ -0,0 +1 @@
+^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/COMPONENTS_EMPTY_DIR-build/_CPack_Packages/.*/RPM/SPECS/components_empty_dir.spec$
diff --git a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake
new file mode 100644
index 0000000..0c2977f
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake
@@ -0,0 +1,5 @@
+set(whitespaces_ "[\t\n\r ]*")
+
+set(EXPECTED_FILES_COUNT "1")
+set(EXPECTED_FILE_1 "empty_dir*.rpm")
+set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$")
diff --git a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-stderr.txt b/Tests/RunCMake/CPack/RPM/EMPTY_DIR-stderr.txt
new file mode 100644
index 0000000..1777aa0
--- /dev/null
+++ b/Tests/RunCMake/CPack/RPM/EMPTY_DIR-stderr.txt
@@ -0,0 +1 @@
+^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/EMPTY_DIR-build/_CPack_Packages/.*/RPM/SPECS/empty_dir.spec$
diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake
index 3e5714d..89673c2 100644
--- a/Tests/RunCMake/CPack/RunCMakeTest.cmake
+++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake
@@ -8,3 +8,5 @@ run_cpack_test(MINIMAL "RPM;DEB" false)
run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false)
run_cpack_test(DEB_EXTRA "DEB" false)
run_cpack_test(DEPENDENCIES "RPM;DEB" true)
+run_cpack_test(EMPTY_DIR "RPM;DEB" true)
+run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB" true)