mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-18 18:01:02 -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
|
||||
${CMAKE_CPACK_COMMAND} --config CPackSourceConfig.cmake
|
||||
)
|
||||
run_cmake_script(SrcSymlinksCheck)
|
||||
endfunction()
|
||||
|
||||
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 cygwin/
|
||||
x cygwin/build.sh
|
||||
x cygwin/setup.patch
|
||||
^x build.sh
|
||||
x CMakeLists.txt
|
||||
x dirlink
|
||||
x include/
|
||||
x include/src.h
|
||||
x link.h
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user