Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
hopefully add all the missing binaries to the tests
authorMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 12 Jan 2019 22:12:52 +0000 (23:12 +0100)
committerMartin Quinson <martin.quinson@ens-rennes.fr>
Sat, 12 Jan 2019 22:12:55 +0000 (23:12 +0100)
CMakeLists.txt
examples/msg/mc/CMakeLists.txt
teshsuite/smpi/isp/umpire/CMakeLists.txt
tools/cmake/Tests.cmake
tools/cmake/UnitTesting.cmake
tools/graphicator/CMakeLists.txt

index ee19db8..670f2ed 100644 (file)
@@ -752,12 +752,12 @@ SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
 ### Define source packages for Libs
 include(${CMAKE_HOME_DIRECTORY}/tools/cmake/DefinePackages.cmake)
 
+add_custom_target(tests COMMENT "Recompiling the tests")
+
 ### Build some Maintainer files
 include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MaintainerMode.cmake)
 include(${CMAKE_HOME_DIRECTORY}/tools/cmake/UnitTesting.cmake)
 
-add_custom_target(tests COMMENT "Recompiling the tests")
-
 ### Make Libs
 if(NOT WIN32)
   include(${CMAKE_HOME_DIRECTORY}/tools/cmake/MakeLib.cmake)
@@ -799,6 +799,7 @@ if(enable_python)
     target_compile_features(python-bindings PRIVATE cxx_std_14)
     target_link_libraries(python-bindings PUBLIC simgrid)
     set_target_properties(python-bindings PROPERTIES LIBRARY_OUTPUT_NAME simgrid)
+    add_dependencies(tests python-bindings)
     set_property(TARGET python-bindings
                  APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
   else()
index 9536ab1..c97451b 100644 (file)
@@ -1,7 +1,8 @@
 foreach (x bugged1 bugged2 bugged3 centralized_mutex electric_fence bugged1_liveness bugged2_liveness)
   if(SIMGRID_HAVE_MC)
-    add_executable       (${x} ${x}.c)
+    add_executable       (${x} EXCLUDE_FROM_ALL ${x}.c)
     target_link_libraries(${x} simgrid)
+    add_dependencies(tests ${x})
   endif()
   set(examples_src  ${examples_src} ${CMAKE_CURRENT_SOURCE_DIR}/${x}.c)
   set(xml_files     ${xml_files}    ${CMAKE_CURRENT_SOURCE_DIR}/deploy_${x}.xml)
@@ -9,13 +10,15 @@ endforeach()
 
 if(SIMGRID_HAVE_MC)
   if(HAVE_C_STACK_CLEANER)
-    add_executable       (bugged1_liveness_cleaner_on  bugged1_liveness.c)
+    add_executable       (bugged1_liveness_cleaner_on  EXCLUDE_FROM_ALL bugged1_liveness.c)
     target_link_libraries(bugged1_liveness_cleaner_on  simgrid)
     set_target_properties(bugged1_liveness_cleaner_on  PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fstack-cleaner")
+    add_dependencies(tests bugged1_liveness_cleaner_on)
     
-    add_executable       (bugged1_liveness_cleaner_off bugged1_liveness.c)
+    add_executable       (bugged1_liveness_cleaner_off EXCLUDE_FROM_ALL bugged1_liveness.c)
     target_link_libraries(bugged1_liveness_cleaner_off simgrid)
     set_target_properties(bugged1_liveness_cleaner_off PROPERTIES COMPILE_FLAGS "-DGARBAGE_STACK -fno-stack-cleaner")
+    add_dependencies(tests bugged1_liveness_cleaner_off)
   endif()
 endif()
 
index 28f0ac7..5dc3cd1 100644 (file)
@@ -206,7 +206,8 @@ if(enable_smpi AND enable_model-checking AND enable_smpi_ISP_testsuite)
   include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
 
   foreach (test ${umpire_tests_passing} ${umpire_tests_deadlock} ${umpire_tests_problematic} )
-    add_executable(${test} ${test}.c)
+    add_executable(${test} EXCLUDE_FROM_ALL ${test}.c)
+    add_dependencies(tests ${test})
     target_link_libraries(${test} simgrid)
     set_source_files_properties(${test}.c PROPERTIES COMPILE_FLAGS "-Dlint -Wno-error -Wno-return-type")
     set(umpire_tesh ${umpire_tesh} ${test})
index d0200dd..971c6f5 100644 (file)
@@ -130,30 +130,21 @@ if(Boost_UNIT_TEST_FRAMEWORK_FOUND)
   add_executable       (unit-tmgr src/surf/trace_mgr_test.cpp)
   target_link_libraries(unit-tmgr simgrid boost_unit_test_framework)
   ADD_TEST(unit-tmgr ${CMAKE_BINARY_DIR}/unit-tmgr --build_info=yes)
-  set_property(
-    TARGET unit-tmgr
-    APPEND PROPERTY
-           INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}"
-          )
+  set_property(TARGET unit-tmgr APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
+  add_dependencies(tests unit-tmgr)
   if (SIMGRID_HAVE_MC)
     # snapshot
     add_executable       (unit-mc-snapshot src/mc/sosp/mc_snapshot_test.cpp)
     target_link_libraries(unit-mc-snapshot simgrid boost_unit_test_framework)
     ADD_TEST(unit-mc-snapshot ${CMAKE_BINARY_DIR}/unit-mc-snapshot --build_info=yes)
-    set_property(
-      TARGET unit-mc-snapshot
-      APPEND PROPERTY
-             INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}"
-            )
+    set_property(TARGET unit-mc-snapshot APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
+    add_dependencies(tests unit-mc-snapshot)
     # pagestore
     add_executable       (unit-mc-pagestore src/mc/sosp/PageStore_test.cpp)
     target_link_libraries(unit-mc-pagestore simgrid boost_unit_test_framework)
     ADD_TEST(unit-mc-pagestore ${CMAKE_BINARY_DIR}/unit-mc-pagestore --build_info=yes)
-    set_property(
-      TARGET unit-mc-pagestore
-      APPEND PROPERTY
-             INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}"
-            )
+    set_property(TARGET unit-mc-pagestore APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
+    add_dependencies(tests unit-mc-pagestore)
   endif()
 
 else()
index 8586a3f..0ed71bc 100644 (file)
@@ -36,7 +36,8 @@ ADD_CUSTOM_COMMAND(
   COMMAND           ${CMAKE_HOME_DIRECTORY}/tools/sg_unit_extractor.pl --root=src/ --outdir=${CMAKE_CURRENT_BINARY_DIR}/src/ ${FILES_CONTAINING_UNITTESTS}
 )
 
-add_executable       (testall ${EXTRACTED_TEST_SOURCE_FILES})
+add_executable       (testall EXCLUDE_FROM_ALL ${EXTRACTED_TEST_SOURCE_FILES})
+add_dependencies(tests testall)
 target_link_libraries(testall simgrid)
 set_property(
     TARGET testall
index 954e3ee..5d81a73 100644 (file)
@@ -1,4 +1,5 @@
-add_executable       (graphicator graphicator.c)
+add_executable       (graphicator EXCLUDE_FROM_ALL graphicator.c)
+add_dependencies     (tests       graphicator)
 target_link_libraries(graphicator simgrid)
 set_target_properties(graphicator PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
 ADD_TESH(graphicator --setenv srcdir=${CMAKE_HOME_DIRECTORY} --setenv bindir=${CMAKE_BINARY_DIR}/bin --cd ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/graphicator.tesh)