X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/5ec2b80b686983f84ebab7c7398a29e73286deee..824740eb0df1dedddb86035ff3730d87e037f356:/examples/cpp/CMakeLists.txt diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt index 232d3d1026..a0705d7032 100644 --- a/examples/cpp/CMakeLists.txt +++ b/examples/cpp/CMakeLists.txt @@ -16,13 +16,19 @@ set(_actor-stacksize_factories "^thread") # Threads ignore modifications of the # The maestro-set example only works for threads set(_maestro-set_factories "thread") -if(SIMGRID_HAVE_MC) - # These tests timeout with threads, maybe because of dwarf parsing? not sure - foreach(example mc-bugged1 mc-bugged2 mc-failing-assert mc-electric-fence) - set(_${example}_factories "^thread") # Timeout - add_dependencies(tests-mc s4u-${example}) +# These tests timeout with threads, not sure why +foreach(example mc-bugged1 mc-bugged2 mc-failing-assert mc-electric-fence) + set(_${example}_factories "^thread") # Timeout + add_dependencies(tests-mc s4u-${example}) +endforeach() + +if(enable_coverage) + foreach (example mc-bugged1 mc-bugged2 mc-electric-fence mc-failing-assert) + ADD_TEST(cover-${example} ${CMAKE_CURRENT_BINARY_DIR}/${example}/s4u-${example} ${CMAKE_HOME_DIRECTORY}/examples/platforms/model_checker_platform.xml) endforeach() +endif() +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) target_link_libraries(s4u-mc-bugged1-liveness-cleaner-on simgrid) @@ -62,15 +68,11 @@ if(SIMGRID_HAVE_MC) endif() if(enable_coverage) - foreach (example mc-bugged1 mc-bugged2 mc-electric-fence mc-failing-assert) - ADD_TEST(cover-${example} ${CMAKE_CURRENT_BINARY_DIR}/${example}/s4u-${example} ${CMAKE_HOME_DIRECTORY}/examples/platforms/model_checker_platform.xml) - endforeach() 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() else() - foreach (example mc-bugged1 mc-bugged2 mc-centralized-mutex mc-failing-assert mc-electric-fence - mc-bugged1-liveness mc-bugged2-liveness) + foreach (example mc-bugged1-liveness mc-bugged2-liveness) set(_${example}_disable 1) endforeach() endif() @@ -79,29 +81,29 @@ endif() 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) + 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) - add_dependencies(tests-mc s4u-${example}) - endif() + add_dependencies(tests-mc s4u-${example}) endforeach() -if (SIMGRID_HAVE_MC) - # Dependency on the regular tests - foreach(example mc-centralized-mutex) - add_dependencies(tests-mc s4u-${example}) - endforeach() -endif() - +# Dependency on the regular tests +foreach(example mc-centralized-mutex) + add_dependencies(tests-mc s4u-${example}) +endforeach() if(NOT HAVE_GRAPHVIZ) set(_dag-from-dot_disable 1) + set(_dag-from-dot-simple_disable 1) +endif() + +if (NOT SIMGRID_HAVE_JSON) + set(_dag-from-json-simple_disable 1) endif() if(NOT SIMGRID_HAVE_NS3) @@ -116,10 +118,11 @@ 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 + battery-degradation battery-simple battery-energy + 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 + dag-comm dag-from-json-simple dag-from-dax-simple dag-from-dax dag-from-dot-simple dag-from-dot dag-failure dag-io dag-scheduling dag-simple dag-tuto dht-chord dht-kademlia energy-exec energy-boot energy-link energy-vm energy-exec-ptask energy-wifi engine-filtering engine-run-partial @@ -129,7 +132,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 @@ -212,25 +215,25 @@ 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. # +# if(SIMGRID_HAVE_STATEFUL_MC) # 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() +# endif() + + 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) 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() @@ -286,14 +289,18 @@ set(xml_files ${xml_files} ${CMAKE_CURRENT_SOURCE_DIR}/actor-create/s4u-a ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/dogbone_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/onelink_d.xml ${CMAKE_CURRENT_SOURCE_DIR}/network-ns3/one_cluster_d.xml PARENT_SCOPE) -set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py +set(bin_files ${bin_files} ${CMAKE_CURRENT_SOURCE_DIR}/battery-degradation/plot_battery_degradation.py + ${CMAKE_CURRENT_SOURCE_DIR}/dht-kademlia/generate.py ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/s4u-mc-bugged1-liveness-stack-cleaner ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged1-liveness/promela_bugged1_liveness ${CMAKE_CURRENT_SOURCE_DIR}/mc-bugged2-liveness/promela_bugged2_liveness PARENT_SCOPE) set(txt_files ${txt_files} ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax/simple_dax_with_cycle.xml ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax/smalldax.xml + ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dax-simple/dag.xml ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag.dot + ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot-simple/dag.dot ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-dot/dag_with_cycle.dot + ${CMAKE_CURRENT_SOURCE_DIR}/dag-from-json-simple/dag.json ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p0.txt ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm-split-p1.txt ${CMAKE_CURRENT_SOURCE_DIR}/replay-comm/s4u-replay-comm.txt