- FOREACH (s ${umpire_src})
- STRING(REGEX REPLACE "\\.c$" "" exe ${s})
- add_executable(${exe} ${s})
- target_link_libraries(${exe} simgrid)
- set_source_files_properties(${s} PROPERTIES COMPILE_FLAGS "-Wno-error")
- ENDFOREACH(s)
+ foreach (test ${umpire_tests_passing} ${umpire_tests_deadlock} ${umpire_tests_problematic} )
+ add_executable(${test} ${test}.c)
+ target_link_libraries(${test} simgrid)
+ set_source_files_properties(${test}.c PROPERTIES COMPILE_FLAGS "-Wno-error")
+ set(umpire_tesh ${umpire_tesh} ${test})
+ set(files_to_clean ${files_to_clean} ${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh)
+ endforeach(test)
+
+ # TODO, what should we do about ${umpire_tests_missed_deadlock}?
+
+ foreach (test ${umpire_tests_passing})
+ write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30")
+ write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display" APPEND)
+ write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
+ endforeach()
+
+ foreach (test ${umpire_tests_deadlock} ${umpire_tests_problematic} )
+ write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! timeout 30" )
+ write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! expect return 3" APPEND)
+ write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "! output display" APPEND)
+ write_file(${CMAKE_CURRENT_BINARY_DIR}/${test}.tesh "\$ \${bindir:=.}/../../../../bin/smpirun -wrapper \"\${bindir:=.}/../../../../bin/simgrid-mc\" -hostfile ../../hostfile -platform ../../../../examples/platforms/small_platform.xml --log=xbt_cfg.thresh:warning -np 3 --cfg=smpi/running_power:1e9 --cfg=smpi/coll_selector:mpich \${bindir:=.}/${test} --log=smpi_coll.thresh:error" APPEND)
+ endforeach()
+endif()
+
+# Erase all tesh files on cleanup: they are generated anyway
+set_directory_properties ( PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${files_to_clean}" )
+
+if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
+ foreach (tesh ${umpire_tesh})
+ ADD_TESH(mc-umpire-${tesh}
+ --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}
+ --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}
+ --cd ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}/${tesh}.tesh)
+ endforeach()