mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-20 02:41:01 -05:00
Tests: Check symlinks to directories in RunCMake.CPackSymlinks
Regression test for issue #21886
This commit is contained in:
@@ -15,6 +15,7 @@ function(run_cpack_symlink_test)
|
|||||||
run_cmake_command(SrcSymlinksCPack
|
run_cmake_command(SrcSymlinksCPack
|
||||||
${CMAKE_CPACK_COMMAND} --config CPackSourceConfig.cmake
|
${CMAKE_CPACK_COMMAND} --config CPackSourceConfig.cmake
|
||||||
)
|
)
|
||||||
|
run_cmake_script(SrcSymlinksCheck)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
run_cpack_symlink_test()
|
run_cpack_symlink_test()
|
||||||
|
|||||||
21
Tests/RunCMake/CPackSymlinks/SrcSymlinksCheck.cmake
Normal file
21
Tests/RunCMake/CPackSymlinks/SrcSymlinksCheck.cmake
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
set(dir ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
set(tarball ${dir}/SrcSymlinks-0.1-Source.tar.gz)
|
||||||
|
set(extrdir ${dir}/SrcSymlinks-0.1-Source)
|
||||||
|
|
||||||
|
message(STATUS "Extracting ${tarball} in ${dir}...")
|
||||||
|
execute_process(COMMAND ${CMAKE_COMMAND} -E tar xvf ${tarball}
|
||||||
|
RESULT_VARIABLE result
|
||||||
|
OUTPUT_VARIABLE output
|
||||||
|
ERROR_VARIABLE output
|
||||||
|
WORKING_DIRECTORY ${dir})
|
||||||
|
message(STATUS "result='${result}'")
|
||||||
|
message(STATUS "output='${output}'")
|
||||||
|
|
||||||
|
if(NOT ${result} EQUAL 0)
|
||||||
|
message(FATAL_ERROR "Cannot unpack source tarball")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT EXISTS ${extrdir}/dirlink/src.h)
|
||||||
|
message(FATAL_ERROR "${extrdir}/dirlink/src.h not found")
|
||||||
|
endif()
|
||||||
@@ -1,7 +1,6 @@
|
|||||||
^x CMakeLists.txt
|
^x build.sh
|
||||||
x cygwin/
|
x CMakeLists.txt
|
||||||
x cygwin/build.sh
|
x dirlink
|
||||||
x cygwin/setup.patch
|
|
||||||
x include/
|
x include/
|
||||||
x include/src.h
|
x include/src.h
|
||||||
x link.h
|
x link.h
|
||||||
|
|||||||
Binary file not shown.
Reference in New Issue
Block a user