Просмотр исходного кода

Tests: Fix RunCMake.ExternalProject filesystem delay for Borland Makefiles

Our 1.125s delay does not seem to be long enough to be reliable with
the Borland "make" tool.  Use a longer delay for Borland and Watcom.

Follow the pattern from commit 67040500ea (Tests: Fix
RunCMake.BuildDepends filesystem delay for Borland Makefiles,
2015-09-25, v3.4.0-rc1~38^2).
Brad King 3 лет назад
Родитель
Сommit
e46e4ee96a
1 измененных файлов с 8 добавлено и 1 удалено
  1. 8 1
      Tests/RunCMake/ExternalProject/RunCMakeTest.cmake

+ 8 - 1
Tests/RunCMake/ExternalProject/RunCMakeTest.cmake

@@ -6,6 +6,13 @@ include(RunCMake)
 unset(ENV{http_proxy})
 unset(ENV{http_proxy})
 unset(ENV{https_proxy})
 unset(ENV{https_proxy})
 
 
+if(RunCMake_GENERATOR STREQUAL "Borland Makefiles" OR
+   RunCMake_GENERATOR STREQUAL "Watcom WMake")
+  set(fs_delay 3)
+else()
+  set(fs_delay 1.125)
+endif()
+
 run_cmake(BadIndependentStep1)
 run_cmake(BadIndependentStep1)
 run_cmake(BadIndependentStep2)
 run_cmake(BadIndependentStep2)
 run_cmake(NoOptions)
 run_cmake(NoOptions)
@@ -72,7 +79,7 @@ function(__ep_test_source_dir_change)
   # we have to ensure we don't re-run the configure stage too quickly after the
   # we have to ensure we don't re-run the configure stage too quickly after the
   # first build. Otherwise, the modified RepositoryInfo.txt files the next
   # first build. Otherwise, the modified RepositoryInfo.txt files the next
   # configure writes might still have the same timestamp as the previous one.
   # configure writes might still have the same timestamp as the previous one.
-  execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1.125)
+  execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${fs_delay})
   run_cmake_command(SourceDirChange-change ${CMAKE_COMMAND} -DSOURCE_DIR_CHANGE=YES .)
   run_cmake_command(SourceDirChange-change ${CMAKE_COMMAND} -DSOURCE_DIR_CHANGE=YES .)
   run_cmake_command(SourceDirChange-build2 ${CMAKE_COMMAND} --build .)
   run_cmake_command(SourceDirChange-build2 ${CMAKE_COMMAND} --build .)
 endfunction()
 endfunction()