From 01347954187ebccf83fc7540163f150a5f430c36 Mon Sep 17 00:00:00 2001 From: Brad King Date: Sun, 26 Feb 2017 10:34:48 -0500 Subject: Tests: Fix RunCMake.ObjectLibrary dependency delay Sleep before the second copy to avoid the need for a touch. Sleep for longer on generators whose build tools have low resolution timestamps. --- Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake index 9291218..0ac5b8c 100644 --- a/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake +++ b/Tests/RunCMake/ObjectLibrary/RunCMakeTest.cmake @@ -24,14 +24,20 @@ function(run_Dependencies) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + 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_command(Dependencies-build ${CMAKE_COMMAND} -E copy ${RunCMake_SOURCE_DIR}/depends_obj1.cpp ${RunCMake_TEST_BINARY_DIR}/depends_obj.cpp) run_cmake(Dependencies) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build .) + run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E sleep ${fs_delay}) run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E copy ${RunCMake_SOURCE_DIR}/depends_obj0.cpp ${RunCMake_TEST_BINARY_DIR}/depends_obj.cpp) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E sleep 1) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} -E touch_nocreate ${RunCMake_TEST_BINARY_DIR}/depends_obj.cpp) - run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build .) - run_cmake_command(Dependencies-build ${CMAKE_CTEST_COMMAND} -C Debug) + run_cmake_command(Dependencies-build ${CMAKE_COMMAND} --build . --config Debug) + run_cmake_command(Dependencies-build ${CMAKE_CTEST_COMMAND} -C Debug -V) endfunction() run_Dependencies() -- cgit v0.12