Always enable RT tests if possible
This commit is contained in:
parent
d1cff39359
commit
2feccc7ba0
@ -85,7 +85,6 @@ let
|
|||||||
last.nanos6
|
last.nanos6
|
||||||
pkgs.strace
|
pkgs.strace
|
||||||
];
|
];
|
||||||
cmakeFlags = old.cmakeFlags ++ [ "-DENABLE_TEST_RT=ON" ];
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -20,7 +20,4 @@ set(OVNI_TEST_BUILD_DIR "${CMAKE_BINARY_DIR}/test")
|
|||||||
include(macros.cmake)
|
include(macros.cmake)
|
||||||
|
|
||||||
add_subdirectory(emu)
|
add_subdirectory(emu)
|
||||||
|
add_subdirectory(rt)
|
||||||
if(ENABLE_TEST_RT)
|
|
||||||
add_subdirectory(rt)
|
|
||||||
endif()
|
|
||||||
|
@ -14,19 +14,5 @@
|
|||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
find_library(nosv libnosv)
|
add_subdirectory(nosv)
|
||||||
find_path(NOSV_INCLUDE_DIR nosv.h)
|
|
||||||
|
|
||||||
function(nosv_test)
|
|
||||||
ovni_test(${ARGN})
|
|
||||||
target_link_libraries("${OVNI_TEST_NAME}" nosv)
|
|
||||||
target_include_directories("${OVNI_TEST_NAME}"
|
|
||||||
PUBLIC ${NOSV_INCLUDE_DIR})
|
|
||||||
set_property(TEST "${OVNI_TEST_NAME}" APPEND
|
|
||||||
PROPERTY
|
|
||||||
ENVIRONMENT "NOSV_CONFIG=${OVNI_TEST_SOURCE_DIR}/rt/nosv/nosv.toml")
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
nosv_test(nosv/attach.c)
|
|
||||||
|
|
||||||
add_subdirectory(nanos6)
|
add_subdirectory(nanos6)
|
||||||
|
@ -1,6 +1,21 @@
|
|||||||
find_library(nanos6 libnanos6)
|
find_library(nanos6 libnanos6)
|
||||||
find_path(NANOS6_INCLUDE_DIR nanos6.h)
|
find_path(NANOS6_INCLUDE_DIR nanos6.h)
|
||||||
|
|
||||||
|
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")
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
check_library_exists(nanos6 nanos6_init "nanos6.h" HAVE_NANOS6)
|
||||||
|
if(NOT HAVE_NANOS6)
|
||||||
|
message(STATUS "Nanos6 not found, disabling Nanos6 RT tests")
|
||||||
|
return()
|
||||||
|
else()
|
||||||
|
message(STATUS "Enabling Nanos6 RT tests")
|
||||||
|
endif()
|
||||||
|
|
||||||
function(nanos6_rt_test)
|
function(nanos6_rt_test)
|
||||||
set(switches "")
|
set(switches "")
|
||||||
set(single LEVEL)
|
set(single LEVEL)
|
||||||
@ -27,6 +42,8 @@ nanos6_rt_test(several-tasks.c)
|
|||||||
nanos6_rt_test(sched-add.c)
|
nanos6_rt_test(sched-add.c)
|
||||||
nanos6_rt_test(if0.c)
|
nanos6_rt_test(if0.c)
|
||||||
nanos6_rt_test(taskfor.c)
|
nanos6_rt_test(taskfor.c)
|
||||||
|
|
||||||
|
# Test multiple instrumentation levels
|
||||||
nanos6_rt_test(simple-task.c NAME simple-task-level-1 LEVEL 1)
|
nanos6_rt_test(simple-task.c NAME simple-task-level-1 LEVEL 1)
|
||||||
nanos6_rt_test(simple-task.c NAME simple-task-level-2 LEVEL 2)
|
nanos6_rt_test(simple-task.c NAME simple-task-level-2 LEVEL 2)
|
||||||
nanos6_rt_test(simple-task.c NAME simple-task-level-3 LEVEL 3)
|
nanos6_rt_test(simple-task.c NAME simple-task-level-3 LEVEL 3)
|
||||||
|
39
test/rt/nosv/CMakeLists.txt
Normal file
39
test/rt/nosv/CMakeLists.txt
Normal file
@ -0,0 +1,39 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2022 Barcelona Supercomputing Center (BSC)
|
||||||
|
#
|
||||||
|
# This program is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, either version 3 of the License, or
|
||||||
|
# (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
find_library(nosv libnosv)
|
||||||
|
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")
|
||||||
|
return()
|
||||||
|
else()
|
||||||
|
message(STATUS "Enabling nOS-V RT tests")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
function(nosv_test)
|
||||||
|
ovni_test(${ARGN})
|
||||||
|
target_link_libraries("${OVNI_TEST_NAME}" nosv)
|
||||||
|
target_include_directories("${OVNI_TEST_NAME}"
|
||||||
|
PUBLIC ${NOSV_INCLUDE_DIR})
|
||||||
|
set_property(TEST "${OVNI_TEST_NAME}" APPEND
|
||||||
|
PROPERTY
|
||||||
|
ENVIRONMENT "NOSV_CONFIG=${OVNI_TEST_SOURCE_DIR}/rt/nosv/nosv.toml")
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
nosv_test(attach.c)
|
Loading…
Reference in New Issue
Block a user