Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
task can now pass tokens (void*) to other tasks. add example using tokens and apache...
[simgrid.git] / examples / cpp / CMakeLists.txt
index 1557b7a..66187a8 100644 (file)
@@ -34,6 +34,7 @@ else()
   endforeach()
 endif()
 
+set(tesh_files ${tesh_files} ${CMAKE_CURRENT_SOURCE_DIR}/synchro-mutex/s4u-mc-synchro-mutex-stateful.tesh)
 if(SIMGRID_HAVE_STATEFUL_MC)
   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)
@@ -47,6 +48,14 @@ if(SIMGRID_HAVE_STATEFUL_MC)
     add_dependencies(tests-mc s4u-mc-bugged1-liveness-cleaner-off)
   endif()
 
+  ADD_TESH(s4u-mc-synchro-mutex-stateful
+     --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/synchro-mutex
+     --setenv libdir=${CMAKE_BINARY_DIR}/lib
+     --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
+     --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/synchro-mutex
+     --cd ${CMAKE_CURRENT_SOURCE_DIR}/synchro-mutex
+      ${CMAKE_HOME_DIRECTORY}/examples/cpp/synchro-mutex/s4u-mc-synchro-mutex-stateful.tesh)
+
   # Model-checking liveness
   if(HAVE_UCONTEXT_CONTEXTS AND SIMGRID_PROCESSOR_x86_64)
     # liveness model-checking works only on 64bits (for now ...)
@@ -57,10 +66,13 @@ if(SIMGRID_HAVE_STATEFUL_MC)
     # This example never ends, disable it for now
     set(_mc-bugged2-liveness_disable 1)
 
-    ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness
-                                                      --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
-                                                      --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness
-                                                       ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh)
+    if ("${CMAKE_SYSTEM}" MATCHES "Linux")
+      # timeout under FreeBSD (test never stops)
+      ADD_TESH(s4u-mc-bugged1-liveness-visited-ucontext --setenv bindir=${CMAKE_CURRENT_BINARY_DIR}/mc-bugged1-liveness
+                                                        --setenv platfdir=${CMAKE_HOME_DIRECTORY}/examples/platforms
+                                                        --cd ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness
+                                                        ${CMAKE_HOME_DIRECTORY}/examples/cpp/mc-bugged1-liveness/s4u-mc-bugged1-liveness-visited.tesh)
+    endif()
     IF(HAVE_C_STACK_CLEANER)
       add_dependencies(tests-mc s4u-mc-bugged1-liveness-stack-cleaner)
       # This test checks if the stack cleaner is making a difference:
@@ -159,7 +171,8 @@ 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
-                 operation-simple operation-variable-load operation-switch-host
+                 task-io task-simple task-variable-load task-storm task-switch-host
+                 photovoltaic-simple
                  platform-comm-serialize platform-failures platform-profile platform-properties
                  plugin-host-load plugin-link-load plugin-prodcons
                  replay-comm replay-io
@@ -212,10 +225,6 @@ foreach (example activity-testany activity-waitany
   unset(_${example}_teshfile)
 endforeach()
 
-# Don't run mc-*-liveness tests in parallel, as they can use a lot of memory and timeout.
-get_directory_property(_serial_tests TESTS)
-list(FILTER _serial_tests INCLUDE REGEX "-mc-.*-liveness-")
-set_tests_properties(${_serial_tests} PROPERTIES RUN_SERIAL "TRUE")
 
 # Specific examples
 ###################
@@ -273,7 +282,7 @@ foreach(example mc-failing-assert)
                                       --setenv srcdir=${CMAKE_CURRENT_SOURCE_DIR}/${example}
                                       --cd ${CMAKE_CURRENT_SOURCE_DIR}/${example}
                                       ${CMAKE_HOME_DIRECTORY}/examples/cpp/${example}/s4u-${example}-nodpor.tesh)
-  endif()                                    
+  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()