diff --git a/CMakeLists.txt b/CMakeLists.txt index 1f0128e..7813052 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,7 @@ set(CMAKE_C_STANDARD_REQUIRED TRUE) set(CMAKE_C_EXTENSIONS FALSE) option(ENABLE_DEBUG_LOG "Enable debug messages (very verbose)") +option(ENABLE_ALL_TESTS "Forces the execution of all tests") if(ENABLE_DEBUG_LOG) add_definitions(-DENABLE_DEBUG) diff --git a/nix/rt.nix b/nix/rt.nix index af49a7c..abbc47d 100644 --- a/nix/rt.nix +++ b/nix/rt.nix @@ -82,6 +82,7 @@ let last.nodes pkgs.strace ]; + cmakeFlags = old.cmakeFlags ++ [ "-DENABLE_ALL_TESTS=ON" ]; preConfigure = old.preConfigure + '' export NODES_HOME="${last.nodes}" export NANOS6_HOME="${last.nanos6}" diff --git a/test/rt/nanos6/CMakeLists.txt b/test/rt/nanos6/CMakeLists.txt index 1b7d354..dbbdd99 100644 --- a/test/rt/nanos6/CMakeLists.txt +++ b/test/rt/nanos6/CMakeLists.txt @@ -6,12 +6,20 @@ find_package(Nanos6) include(CheckCCompilerFlag) check_c_compiler_flag("-fompss-2" HAVE_FOMPSS2_FLAG) if(NOT HAVE_FOMPSS2_FLAG) - message(STATUS "Compiler doesn't support -fompss-2 flag, disabling Nanos6 RT tests") + if(ENABLE_ALL_TESTS) + message(FATAL_ERROR "Compiler doesn't support -fompss-2 flag, cannot enable Nanos6 RT tests") + else() + message(STATUS "Compiler doesn't support -fompss-2 flag, disabling Nanos6 RT tests") + endif() return() endif() if(NOT NANOS6_FOUND) - message(STATUS "Nanos6 not found, disabling Nanos6 RT tests") + if(ENABLE_ALL_TESTS) + message(FATAL_ERROR "Nanos6 not found, cannot enable Nanos6 RT tests") + else() + message(STATUS "Nanos6 not found, disabling Nanos6 RT tests") + endif() return() else() message(STATUS "Enabling Nanos6 RT tests") diff --git a/test/rt/nodes/CMakeLists.txt b/test/rt/nodes/CMakeLists.txt index 6458e1e..f09716e 100644 --- a/test/rt/nodes/CMakeLists.txt +++ b/test/rt/nodes/CMakeLists.txt @@ -6,12 +6,20 @@ find_package(Nodes) include(CheckCCompilerFlag) check_c_compiler_flag("-fompss-2" HAVE_FOMPSS2_FLAG) if(NOT HAVE_FOMPSS2_FLAG) - message(STATUS "Compiler doesn't support -fompss-2 flag, disabling NODES RT tests") + if(ENABLE_ALL_TESTS) + message(FATAL_ERROR "Compiler doesn't support -fompss-2 flag, cannot enable NODES RT tests") + else() + message(STATUS "Compiler doesn't support -fompss-2 flag, disabling NODES RT tests") + endif() return() endif() if(NOT NODES_FOUND) - message(STATUS "NODES not found, disabling NODES RT tests") + if(ENABLE_ALL_TESTS) + message(FATAL_ERROR "NODES not found, cannot enable NODES RT tests") + else() + message(STATUS "NODES not found, disabling NODES RT tests") + endif() return() else() message(STATUS "Enabling NODES RT tests") diff --git a/test/rt/nosv/CMakeLists.txt b/test/rt/nosv/CMakeLists.txt index 6903e77..12fa551 100644 --- a/test/rt/nosv/CMakeLists.txt +++ b/test/rt/nosv/CMakeLists.txt @@ -7,7 +7,11 @@ find_path(NOSV_INCLUDE_DIR nosv.h) check_library_exists(nosv nosv_init "nosv.h" HAVE_NOSV) if(NOT HAVE_NOSV) - message(STATUS "nOS-V library not found, disabling nOS-V RT tests") + if(ENABLE_ALL_TESTS) + message(FATAL_ERROR "nOS-V library not found, cannot enable nOS-V RT tests") + else() + message(STATUS "nOS-V library not found, disabling nOS-V RT tests") + endif() return() else() message(STATUS "Enabling nOS-V RT tests")