musrview_check: serialize the tests sharing an msr-file under 'ctest -j'.

musrview writes its PNGs next to the msr-file as <msr>_<n>.png, hence the
plain, -f and -f -a tests of the same msr-file overwrote/removed each
other's PNGs when run in parallel. Lock them on the msr-file.
This commit is contained in:
suter_a committed 2026-10-18 20:38:06 +02:00
1 parent 407ae8c812
commit 2eb9239a5d
1 file changed
+9
+9
View File
@@ -67,6 +67,13 @@ macro(add_musrview_test test_name msr_file)
${ARGN}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/doc/examples
)
#--- musrview writes its PNGs next to the msr-file under a name derived from
#--- the msr-file only (<msr>_<n>.png), hence all tests on the same msr-file
#--- (plain, -f, -f -a) would overwrite/remove each other's PNGs under
#--- 'ctest -j'. Serialize those, tests on different msr-files still run in
#--- parallel.
set_tests_properties(${test_name} PROPERTIES
RESOURCE_LOCK ${CMAKE_SOURCE_DIR}/doc/examples/${msr_file})
endmacro()
# add_musrview_test_dir(sub_dir test_name msr_file [extra_musrview_args...])
@@ -86,6 +93,8 @@ macro(add_musrview_test_dir sub_dir test_name msr_file)
${ARGN}
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/doc/examples/${sub_dir}
)
set_tests_properties(${test_name} PROPERTIES
RESOURCE_LOCK ${CMAKE_SOURCE_DIR}/doc/examples/${sub_dir}/${msr_file})
endmacro()
#--- doc/examples tests -------------------------------------------------------