Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
A few spelling mistakes and many replacements: [Ss]imgrid -> SimGrid.
[simgrid.git] / teshsuite / smpi / MBI / CMakeLists.txt
index 4e12a1e..d4f9eb8 100644 (file)
@@ -1,23 +1,24 @@
-# Copyright 2021-2022. The SimGrid Team. All rights reserved.
+# Copyright 2021-2023. The SimGrid Team. All rights reserved.
 
 # Integrates the MBI tests into the SimGrid build chain when asked to
 
 # Only the python scripts are embeeded in the archive, and the C test files are generated at config time using these scripts.
 # These python scripts are copied over from the MBI repository with as little changes as possible.
 
+file(GLOB generator_scripts *Generator.py)
+
 if (enable_smpi_MBI_testsuite)
   if (NOT enable_smpi)
-    message(FATAL_ERROR "MBI test suite cannot be enabled without SMPI. Please change either setting.")
+    message(FATAL_ERROR "The MBI test suite cannot be enabled without SMPI. Please change either setting.")
   endif()
-  if (NOT enable_model-checking)
-    message(FATAL_ERROR "MBI test suite cannot be enabled without the Mc SimGrid model-checker. Please change either setting.")
+  if (NOT SIMGRID_HAVE_MC)
+    message(FATAL_ERROR "The MBI test suite cannot be enabled without the model-checker. Please change either setting.")
   endif()
 
   message(STATUS "Generating the MBI test cases")
   file(REMOVE_RECURSE  ${CMAKE_BINARY_DIR}/MBI/tmp)
   file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/MBI/tmp)
   file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/generator_utils.py DESTINATION ${CMAKE_BINARY_DIR}/MBI/tmp)
-  file(GLOB generator_scripts *Generator.py)
   foreach (script ${generator_scripts})
     message(STATUS "  $ ${CMAKE_CURRENT_SOURCE_DIR}/${script}")
     execute_process(COMMAND ${PYTHON_EXECUTABLE} ${script}
@@ -27,7 +28,6 @@ if (enable_smpi_MBI_testsuite)
       message(FATAL_ERROR "Command failed with status: ${status}")
     endif()
   endforeach()
-  unset(generator_scripts)
 
   set(CMAKE_C_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicc")
   set(CMAKE_CXX_COMPILER "${CMAKE_BINARY_DIR}/smpi_script/bin/smpicxx")
@@ -38,7 +38,7 @@ if (enable_smpi_MBI_testsuite)
   add_dependencies(tests tests-mbi)
   add_dependencies(tests-mbi simgrid-mc smpimain)
 
-  # Remove Concurrency tests that are out of reach because simgrid does not intercept local modifications yet
+  # Remove Concurrency tests that are out of reach because SimGrid does not intercept local modifications yet
   # An idea could be to use ASan on the verified application, along with https://github.com/google/sanitizers/wiki/AddressSanitizerManualPoisoning
   # But currently, ASan is not usable at all, since the Checker dislikes this trick when it tries to read the memory of the app.
   # We should change the checker to not read the app when verifying safty properties
@@ -84,7 +84,7 @@ endif()
 
 # Add the needed files to the distribution
 foreach(script ${generator_scripts})
-  set(teshsuite_src ${teshsuite_src} ${CMAKE_CURRENT_SOURCE_DIR}/${script})
+  set(teshsuite_src ${teshsuite_src} ${script})
 endforeach()
 
 set(teshsuite_src ${teshsuite_src}