From 583ea02a47b3632c1325413d2bad95c0b849580c Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Fri, 29 May 2020 12:39:37 -0400 Subject: [PATCH] windows: force quick tests in serial fixes the test failures in #10409 (now that we have 2 quicktests) --- tests/quick_tests/run.cmake | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/quick_tests/run.cmake b/tests/quick_tests/run.cmake index ab6e7fc806..4fd17f765c 100644 --- a/tests/quick_tests/run.cmake +++ b/tests/quick_tests/run.cmake @@ -22,6 +22,18 @@ IF(_n_processors EQUAL 0) SET(_n_processors "1") ENDIF() + +# Windows quick tests have a race condition, so disable compiling/running +# tests in parallel. This avoid errors like: +# +# error MSB3491: Could not write lines to file +# "obj_boost_system_debug.dir\Debug\obj_boos.4A356C5C.tlog\obj_boost_system_debug.lastbuildstate". The +# process cannot access the file '...' because it is being used by another +# process. +IF(CMAKE_SYSTEM_NAME MATCHES "Windows") + SET(_n_processors "1") +ENDIF() + SEPARATE_ARGUMENTS(ALL_TESTS) EXECUTE_PROCESS(COMMAND ${CMAKE_CTEST_COMMAND} -j${_n_processors} -- 2.39.5