RESOURCE_LOCK doesn't stop tests being started simultaneously
After !8995 (merged), setting RESOURCE_LOCK
for tests does not stop them from being started simultaneously anymore. With the following setup
#CMakeLists.txt
cmake_minimum_required(VERSION 3.16)
project(ResourceLockDemo VERSION 0.1.0 LANGUAGES CXX)
include(CTest)
add_executable(main test.cpp)
add_test(test1 main)
set_tests_properties(test1 PROPERTIES RESOURCE_LOCK resource)
add_test(test2 main)
set_tests_properties(test2 PROPERTIES RESOURCE_LOCK resource)
//test.cpp
int main() {}
Running
ctest --parallel
will start the tests as follows
Start 1: test1
Start 2: test2
1/2 Test #1: test1 ............................ Passed 0.00 sec
2/2 Test #2: test2 ............................ Passed 0.00 sec