From e674c92f13b38b02b4d3e7c189f08394a15143d9 Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Date: Thu, 2 Feb 2023 14:00:50 +0100 Subject: [PATCH] Enable emu and rt tests for nanos6 and ovni --- src/CMakeLists.txt | 7 +++++++ src/rt/CMakeLists.txt | 4 ++-- test/CMakeLists.txt | 4 ++-- test/emu/CMakeLists.txt | 2 +- test/emu/nanos6/CMakeLists.txt | 2 +- test/emu/ovni/flush.c | 2 +- test/ovni-driver.sh | 2 +- test/rt/CMakeLists.txt | 4 ++-- 8 files changed, 17 insertions(+), 10 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 89fc089..fe81f75 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -7,9 +7,16 @@ add_library(parson STATIC parson.c) target_include_directories(parson PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") set_property(TARGET parson PROPERTY POSITION_INDEPENDENT_CODE ON) +add_library(common STATIC common.c) +target_include_directories(common PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") +set_property(TARGET common PROPERTY POSITION_INDEPENDENT_CODE ON) + add_library(parson-static STATIC parson.c) target_include_directories(parson-static PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") +add_library(common-static STATIC common.c) +target_include_directories(common-static PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}") + configure_file("config.h.in" "${CMAKE_CURRENT_BINARY_DIR}/config.h" ) include_directories(${CMAKE_CURRENT_BINARY_DIR}) diff --git a/src/rt/CMakeLists.txt b/src/rt/CMakeLists.txt index d9f2df8..383fcd4 100644 --- a/src/rt/CMakeLists.txt +++ b/src/rt/CMakeLists.txt @@ -4,14 +4,14 @@ include_directories("${CMAKE_SOURCE_DIR}/src/include") add_library(ovni SHARED ovni.c) -target_link_libraries(ovni parson) +target_link_libraries(ovni parson common) target_include_directories(ovni PUBLIC "${CMAKE_SOURCE_DIR}/include") set_target_properties(ovni PROPERTIES VERSION 1.0.0 SOVERSION 1) add_library(ovni-static STATIC ovni.c) -target_link_libraries(ovni-static parson-static) +target_link_libraries(ovni-static parson-static common-static) target_include_directories(ovni-static PUBLIC "${CMAKE_SOURCE_DIR}/include") install(TARGETS ovni LIBRARY DESTINATION lib) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 0a8995e..b5e12c2 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -7,5 +7,5 @@ set(OVNI_TEST_BUILD_DIR "${CMAKE_BINARY_DIR}/test") include(macros.cmake) add_subdirectory(unit) -#add_subdirectory(emu) -#add_subdirectory(rt) +add_subdirectory(emu) +add_subdirectory(rt) diff --git a/test/emu/CMakeLists.txt b/test/emu/CMakeLists.txt index cdc3cc4..479c36b 100644 --- a/test/emu/CMakeLists.txt +++ b/test/emu/CMakeLists.txt @@ -2,5 +2,5 @@ # SPDX-License-Identifier: GPL-3.0-or-later add_subdirectory(ovni) -add_subdirectory(nosv) +#add_subdirectory(nosv) add_subdirectory(nanos6) diff --git a/test/emu/nanos6/CMakeLists.txt b/test/emu/nanos6/CMakeLists.txt index 062ed14..f0e056c 100644 --- a/test/emu/nanos6/CMakeLists.txt +++ b/test/emu/nanos6/CMakeLists.txt @@ -3,7 +3,7 @@ ovni_test(nested-tasks.c) ovni_test(nested-tasks-bad.c SHOULD_FAIL - REGEX "fatal: cannot execute task 1: state is not created") + REGEX "cannot execute task 1: state is not created") ovni_test(task-types.c MP) ovni_test(blocking.c MP) ovni_test(ss-mismatch.c SHOULD_FAIL diff --git a/test/emu/ovni/flush.c b/test/emu/ovni/flush.c index 49a142a..140bf73 100644 --- a/test/emu/ovni/flush.c +++ b/test/emu/ovni/flush.c @@ -35,7 +35,7 @@ static void emit(uint8_t *buf, size_t size) { struct ovni_ev ev = {0}; - ovni_ev_set_mcv(&ev, "O$$"); + ovni_ev_set_mcv(&ev, "OB."); ovni_ev_set_clock(&ev, ovni_clock_now()); ovni_ev_jumbo_emit(&ev, buf, size); } diff --git a/test/ovni-driver.sh b/test/ovni-driver.sh index fdcf451..bb2b7e6 100755 --- a/test/ovni-driver.sh +++ b/test/ovni-driver.sh @@ -2,7 +2,7 @@ # Copyright (c) 2021 Barcelona Supercomputing Center (BSC) # SPDX-License-Identifier: GPL-3.0-or-later -set -e +set -ex if [ -n "$OVNI_TEST_VERBOSE" ]; then set -x diff --git a/test/rt/CMakeLists.txt b/test/rt/CMakeLists.txt index 7d11797..dffe718 100644 --- a/test/rt/CMakeLists.txt +++ b/test/rt/CMakeLists.txt @@ -2,5 +2,5 @@ # SPDX-License-Identifier: GPL-3.0-or-later add_subdirectory(nanos6) -add_subdirectory(nodes) -add_subdirectory(nosv) +#add_subdirectory(nodes) +#add_subdirectory(nosv)