summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CPackSymlinks
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2015-03-31 19:04:39 (GMT)
committerBrad King <brad.king@kitware.com>2015-04-06 12:52:54 (GMT)
commit5f686b8a6b5258f6c5aafbb33d7db36b38a3f06d (patch)
tree555e08de6b21c41574f205c83d5f560ee260f9cc /Tests/RunCMake/CPackSymlinks
parentaca1d93bd9b9921ecef83b80bed219a2f5879500 (diff)
downloadCMake-5f686b8a6b5258f6c5aafbb33d7db36b38a3f06d.zip
CMake-5f686b8a6b5258f6c5aafbb33d7db36b38a3f06d.tar.gz
CMake-5f686b8a6b5258f6c5aafbb33d7db36b38a3f06d.tar.bz2
Tests: Add case for CPack source package with symlinks
Diffstat (limited to 'Tests/RunCMake/CPackSymlinks')
-rw-r--r--Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake20
-rw-r--r--Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt10
-rw-r--r--Tests/RunCMake/CPackSymlinks/testcpacksym.tarbin0 -> 10240 bytes
3 files changed, 30 insertions, 0 deletions
diff --git a/Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake b/Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake
new file mode 100644
index 0000000..439d95e
--- /dev/null
+++ b/Tests/RunCMake/CPackSymlinks/RunCMakeTest.cmake
@@ -0,0 +1,20 @@
+include(RunCMake)
+
+function(run_cpack_symlink_test)
+ set(RunCMake_TEST_NO_CLEAN TRUE)
+ set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/SrcSymlinks-build")
+ set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/SrcSymlinks")
+ file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}")
+ file(REMOVE_RECURSE "${RunCMake_TEST_SOURCE_DIR}")
+ file(MAKE_DIRECTORY "${RunCMake_TEST_SOURCE_DIR}")
+ run_cmake_command(SrcSymlinksTar
+ ${CMAKE_COMMAND} -E chdir ${RunCMake_TEST_SOURCE_DIR}
+ ${CMAKE_COMMAND} -E tar xvf ${RunCMake_SOURCE_DIR}/testcpacksym.tar
+ )
+ run_cmake(SrcSymlinksCMake)
+ run_cmake_command(SrcSymlinksCPack
+ ${CMAKE_CPACK_COMMAND} --config CPackSourceConfig.cmake
+ )
+endfunction()
+
+run_cpack_symlink_test()
diff --git a/Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt b/Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt
new file mode 100644
index 0000000..24ad124
--- /dev/null
+++ b/Tests/RunCMake/CPackSymlinks/SrcSymlinksTar-stdout.txt
@@ -0,0 +1,10 @@
+^x CMakeLists.txt
+x cygwin/
+x cygwin/build.sh
+x cygwin/setup.patch
+x include/
+x include/src.h
+x link.h
+x real.h
+x src/
+x src/src.h$
diff --git a/Tests/RunCMake/CPackSymlinks/testcpacksym.tar b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
new file mode 100644
index 0000000..a44c656
--- /dev/null
+++ b/Tests/RunCMake/CPackSymlinks/testcpacksym.tar
Binary files differ