Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Kill a few globals.
[simgrid.git] / examples / cpp / CMakeLists.txt
index c16f574..cea4755 100644 (file)
@@ -13,11 +13,8 @@ set(_dht-kademlia_sources dht-kademlia/s4u-dht-kademlia.cpp dht-kademlia/s4u-dht
 
 set(_actor-stacksize_factories "^thread") # Threads ignore modifications of the stack size
 
-# The maestro-set example only works for threads and when not using windows.
+# The maestro-set example only works for threads
 set(_maestro-set_factories "thread")
-if(WIN32)
-  set(_maestro-set_disable 1)
-endif()
 
 if(SIMGRID_HAVE_MC)
   # These tests timeout with threads, maybe because of dwarf parsing? not sure
@@ -78,11 +75,11 @@ else()
   endforeach()
 endif()
 
-if (SIMGRID_HAVE_MC)
-  # 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)
+# 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
@@ -92,8 +89,10 @@ if (SIMGRID_HAVE_MC)
              ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-mc-${example}.tesh)
 
     add_dependencies(tests-mc s4u-${example})
-  endforeach()
+  endif()
+endforeach()
 
+if (SIMGRID_HAVE_MC)
   # Dependency on the regular tests
   foreach(example mc-centralized-mutex)
     add_dependencies(tests-mc s4u-${example})
@@ -117,7 +116,7 @@ foreach (example activity-testany activity-waitany
                  actor-create actor-daemon actor-exiting actor-join actor-kill
                  actor-lifetime actor-migrate actor-suspend actor-yield actor-stacksize
                  app-bittorrent app-chainsend app-token-ring
-                 comm-pingpong comm-ready comm-serialize comm-suspend comm-testany comm-wait comm-waitany comm-waitall comm-waituntil
+                 comm-pingpong comm-ready comm-suspend comm-testany comm-wait comm-waitany comm-waitall comm-waituntil
                  comm-dependent comm-host2host comm-failure comm-throttling
                  cloud-capping cloud-migration cloud-simple
                  dag-comm dag-from-dax dag-from-dot dag-failure dag-io dag-scheduling dag-simple
@@ -130,7 +129,7 @@ foreach (example activity-testany activity-waitany
                  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
                  io-async io-priority io-degradation io-file-system io-file-remote io-disk-raw io-dependent
-                 platform-failures platform-profile platform-properties
+                 platform-comm-serialize platform-failures platform-profile platform-properties
                  plugin-host-load plugin-link-load plugin-prodcons
                  replay-comm replay-io
                  routing-get-clusters
@@ -211,6 +210,31 @@ foreach(example app-bittorrent app-masterworkers
                                              ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh)
 endforeach()
 
+# Test non-DPOR reductions on a given MC test
+foreach(example mc-failing-assert)
+  if(SIMGRID_HAVE_MC)
+# State equality is not tested because it would take about 15 hours to run that test on my machine.
+# We should first optimize mmalloc_heap_differ() which takes ~4sec for each pair to compare (maybe {175 x 174/ 2} pairs here)
+# See the comment on mmalloc_heap_differ() in compare.cpp for more info on why it's hard to optimize.
+#
+#    ADD_TESH(s4u-${example}-statequality  --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-${example}-statequality.tesh)
+
+    ADD_TESH(s4u-${example}-nodpor    --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-${example}-nodpor.tesh)
+  endif()
+  set(tesh_files    ${tesh_files}   ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}-statequality.tesh)
+  set(tesh_files    ${tesh_files}   ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}-nodpor.tesh)
+endforeach()
+
 # Examples not accepting factories
 ##################################
 
@@ -231,7 +255,7 @@ foreach (example exec-ptask trace-categories trace-masterworkers trace-platform
                           ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}.tesh)
 endforeach()
 
-if (NOT enable_memcheck AND NOT WIN32)
+if (NOT enable_memcheck)
   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/debug-breakpoint.tesh)