Browse Source

Tests: Skip symlink tests on Windows

Tushar Maheshwari 6 years ago
parent
commit
9a3d85cfc5

+ 4 - 0
Tests/RunCMake/file/CREATE_LINK-SYMBOLIC-noexist.cmake

@@ -0,0 +1,4 @@
+file(CREATE_LINK does_not_exist.txt TestSymLink.txt RESULT sym_result SYMBOLIC)
+if(NOT sym_result STREQUAL "0")
+  message("Symlink fail: ${sym_result}")
+endif()

+ 4 - 0
Tests/RunCMake/file/CREATE_LINK-SYMBOLIC.cmake

@@ -0,0 +1,4 @@
+file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestSymLink.cmake RESULT sym_result SYMBOLIC)
+if(NOT sym_result STREQUAL "0")
+  message(SEND_ERROR "Symlink result='${sym_result}'")
+endif()

+ 0 - 5
Tests/RunCMake/file/CREATE_LINK-noexist.cmake

@@ -2,8 +2,3 @@ file(CREATE_LINK does_not_exist.txt TestLink.txt RESULT result)
 if(NOT result STREQUAL "0")
   message("Hard link error: ${result}")
 endif()
-
-file(CREATE_LINK does_not_exist.txt TestSymLink.txt RESULT sym_result SYMBOLIC)
-if(NOT sym_result STREQUAL "0")
-  message("Symlink fail: ${sym_result}")
-endif()

+ 0 - 5
Tests/RunCMake/file/CREATE_LINK.cmake

@@ -2,8 +2,3 @@ file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestLink.cmake RESULT result)
 if(NOT result STREQUAL "0")
   message(SEND_ERROR "Hard link result='${result}'")
 endif()
-
-file(CREATE_LINK ${CMAKE_CURRENT_LIST_FILE} TestSymLink.cmake RESULT sym_result SYMBOLIC)
-if(NOT sym_result STREQUAL "0")
-  message(SEND_ERROR "Symlink result='${sym_result}'")
-endif()

+ 2 - 0
Tests/RunCMake/file/RunCMakeTest.cmake

@@ -56,6 +56,8 @@ run_cmake_command(GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE ${CMAKE_COMMAND} -P
   ${RunCMake_SOURCE_DIR}/GLOB-error-CONFIGURE_DEPENDS-SCRIPT_MODE.cmake)
 
 if(NOT WIN32 OR CYGWIN)
+  run_cmake(CREATE_LINK-SYMBOLIC)
+  run_cmake(CREATE_LINK-SYMBOLIC-noexist)
   run_cmake(GLOB_RECURSE-cyclic-recursion)
   run_cmake(INSTALL-SYMLINK)
   run_cmake(READ_SYMLINK)