Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Convert deprecated/msg/trace-host-user-variables to s4u/trace-host-user-variables.
[simgrid.git] / examples / s4u / CMakeLists.txt
index c449b48..fa5c4c8 100644 (file)
@@ -47,7 +47,6 @@ if(SIMGRID_HAVE_MC)
     set_target_properties(s4u-mc-bugged1-liveness-cleaner-off PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fno-stack-cleaner")
     add_dependencies(tests s4u-mc-bugged1-liveness-cleaner-off)
   endif()
-
 endif()
 
 if(SIMGRID_HAVE_NS3)
@@ -187,7 +186,7 @@ endif()
 # Examples not accepting factories
 ##################################
 
-foreach (example trace-platform)
+foreach (example trace-categories trace-host-user-variables trace-platform)
   add_executable       (s4u-${example} EXCLUDE_FROM_ALL ${example}/s4u-${example}.cpp)
   target_link_libraries(s4u-${example} simgrid)
   set_target_properties(s4u-${example} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${example})
@@ -197,7 +196,9 @@ foreach (example trace-platform)
   set(examples_src  ${examples_src}  ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-${example}.cpp)
   
   ADD_TESH(s4u-${example} --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
+                          --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/${example}
                           --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms 
+                          --cd ${CMAKE_CURRENT_BINARY_DIR}/${example}
                           ${CMAKE_HOME_DIRECTORY}/examples/s4u/${example}/s4u-${example}.tesh)
 endforeach()
 
@@ -207,6 +208,17 @@ if (NOT enable_memcheck AND NOT WIN32)
                             ${CMAKE_CURRENT_SOURCE_DIR}/app-pingpong/simix-breakpoint.tesh)
 endif()
 
+if(enable_coverage)
+  foreach (example mc-bugged1 mc-bugged2 mc-electric-fence mc-failing-assert)
+    if(NOT DEFINED _${example}_disable)
+      ADD_TEST(cover-${example} ${CMAKE_CURRENT_BINARY_DIR}/${example}/s4u-${example} ${CMAKE_HOME_DIRECTORY}/examples/platforms/model_checker_platform.xml)
+    endif()
+  endforeach()
+  if(SIMGRID_HAVE_MC)
+    ADD_TEST(cover-mc-bugged1-liveness ${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness ${CMAKE_HOME_DIRECTORY}/examples/platforms/small_platform.xml 1 1001)
+  endif()
+endif()
+
 # Add all extra files to the archive
 ####################################