Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Rename example, and update doc.
[simgrid.git] / examples / cpp / CMakeLists.txt
index cd6f65e..8c775f4 100644 (file)
@@ -26,10 +26,6 @@ if(SIMGRID_HAVE_MC)
      set(_${example}_factories "^thread") # Timeout
      add_dependencies(tests-mc s4u-${example})
   endforeach()
-
-  # Make all MC tests buildable together
-  #foreach(example ) # no test to be build in any case
-  #endforeach()
   
   if(HAVE_C_STACK_CLEANER)
     add_executable       (s4u-mc-bugged1-liveness-cleaner-on  EXCLUDE_FROM_ALL s4u-mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp)
@@ -83,6 +79,22 @@ else()
   endforeach()
 endif()
 
+# Hijack some regular tests to run them on top of the MC
+foreach (example synchro-barrier synchro-mutex synchro-semaphore)
+  set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/${example}/s4u-mc-${example}.tesh)
+
+  if (SIMGRID_HAVE_MC)
+    ADD_TESH(s4u-mc-${example}
+             --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/${example}
+             --setenv libdir=${CMAKE_BINARY_DIR}/lib
+             --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
+             --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/${example}
+             --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example}
+             ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-mc-${example}.tesh)
+  endif()
+endforeach()
+
+
 if(NOT HAVE_GRAPHVIZ)
   set(_dag-from-dot_disable 1)
 endif()
@@ -107,7 +119,7 @@ foreach (example activity-testany activity-waitany
                  energy-exec energy-boot energy-link energy-vm energy-exec-ptask energy-wifi
                  engine-filtering engine-run-partial
                  exec-async exec-basic exec-dvfs exec-remote exec-waitany exec-waitfor exec-dependent exec-unassigned
-                 exec-ptask-multicore exec-ptask-multicore-latency exec-cpu-nonlinear exec-cpu-factors exec-failure
+                 exec-ptask-multicore exec-ptask-multicore-latency exec-cpu-nonlinear exec-cpu-factors exec-failure exec-threads
                  maestro-set
                  mc-bugged1 mc-bugged1-liveness mc-bugged2 mc-bugged2-liveness mc-centralized-mutex mc-electric-fence mc-failing-assert
                  network-ns3 network-ns3-wifi network-wifi
@@ -214,15 +226,15 @@ foreach (example exec-ptask trace-categories trace-masterworkers trace-platform
 endforeach()
 
 if (NOT enable_memcheck AND NOT WIN32)
-  ADD_TESH(simix-breakpoint --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/comm-pingpong
+  ADD_TESH(debug-breakpoint --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/comm-pingpong
                             --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
-                            ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/simix-breakpoint.tesh)
+                            ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/debug-breakpoint.tesh)
 endif()
 
 # Add all extra files to the archive
 ####################################
 set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.cpp        PARENT_SCOPE)
-set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/simix-breakpoint.tesh
+set(tesh_files    ${tesh_files}   ${CMAKE_CURRENT_SOURCE_DIR}/comm-pingpong/debug-breakpoint.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness.tesh
                                   ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh  PARENT_SCOPE)
 set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-actor-create_d.xml