Integrates unittests for Lts/Services/S* into validation step
This commit is contained in:
12 files changed
+38
-11
No files matched your search
@@ -9,6 +9,7 @@ TEST_DIRS = [
|
|||||||
ROOT / "tests",
|
ROOT / "tests",
|
||||||
ROOT / "test",
|
ROOT / "test",
|
||||||
ROOT / "qt6-after" / "qt6-migrated-benchmark" / "tests",
|
ROOT / "qt6-after" / "qt6-migrated-benchmark" / "tests",
|
||||||
|
ROOT / "qt6-after" / "qt6-migrated-legatus" / "tests",
|
||||||
]
|
]
|
||||||
CPP_EXTENSIONS = {".c", ".cc", ".cpp", ".cxx", ".h", ".hh", ".hpp", ".hxx"}
|
CPP_EXTENSIONS = {".c", ".cc", ".cpp", ".cxx", ".h", ".hh", ".hpp", ".hxx"}
|
||||||
ALLOWED_SIGNERS_FILE = ROOT / "ci" / "allowed_signers"
|
ALLOWED_SIGNERS_FILE = ROOT / "ci" / "allowed_signers"
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ IF(DEFINED LTS_VERSION_MAJOR AND DEFINED LTS_VERSION_MINOR AND DEFINED LTS_VERSI
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
PROJECT(LTS VERSION ${_ver})
|
PROJECT(LTS VERSION ${_ver})
|
||||||
MESSAGE(STATUS "LTS Version: ${LTS_VERSION_MAJOR}.${LTS_VERSION_MINOR}.${LTS_VERSION_PATCH}")
|
MESSAGE(STATUS "LTS Version: ${LTS_VERSION_MAJOR}.${LTS_VERSION_MINOR}.${LTS_VERSION_PATCH}")
|
||||||
|
|
||||||
|
# Enable CTest integration for unit tests
|
||||||
|
include(CTest)
|
||||||
|
|
||||||
function(NGL_ADD_SUBDIR_GUARDED subdir)
|
function(NGL_ADD_SUBDIR_GUARDED subdir)
|
||||||
if(MIGRATE_MODULE STREQUAL "")
|
if(MIGRATE_MODULE STREQUAL "")
|
||||||
add_subdirectory(${subdir})
|
add_subdirectory(${subdir})
|
||||||
|
|||||||
@@ -114,11 +114,11 @@ IF(BUILD_GRANTLEE AND TARGET KF6::TextTemplate)
|
|||||||
|
|
||||||
NGL_TARGET_LINK_LIBRARIES(codegen_grantlee
|
NGL_TARGET_LINK_LIBRARIES(codegen_grantlee
|
||||||
PRIVATE
|
PRIVATE
|
||||||
KF6::TextTemplate
|
|
||||||
NGLLogger
|
NGLLogger
|
||||||
ProjectConfig
|
ProjectConfig
|
||||||
PUBLIC
|
PUBLIC
|
||||||
codegen_base
|
codegen_base
|
||||||
|
KF6::TextTemplate
|
||||||
)
|
)
|
||||||
NGL_TARGET_INCLUDE_DIRECTORIES(codegen_grantlee
|
NGL_TARGET_INCLUDE_DIRECTORIES(codegen_grantlee
|
||||||
PUBLIC
|
PUBLIC
|
||||||
|
|||||||
@@ -23,5 +23,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScrDummy
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_INSTALL_TARGET(svcScrDummy)
|
NGL_INSTALL_TARGET(svcScrDummy)
|
||||||
@@ -28,8 +28,10 @@ IF(BUILD_RTI)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Generate *.cpp/*.hpp from idl
|
# Generate *.cpp/*.hpp from idl
|
||||||
RTIDDSGEN(SRCS_common scm_enums.idl)
|
IF(BUILD_RTI)
|
||||||
RTIDDSGEN(SRCS_common scm.idl)
|
RTIDDSGEN(SRCS_common scm_enums.idl)
|
||||||
|
RTIDDSGEN(SRCS_common scm.idl)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Generate scm_dt[s,c]_types.h, scm_ft[s,c]_types.h
|
# Generate scm_dt[s,c]_types.h, scm_ft[s,c]_types.h
|
||||||
IF(BUILD_RTI)
|
IF(BUILD_RTI)
|
||||||
@@ -45,6 +47,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScmCommon
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcScmCommon
|
NGL_TARGET_LINK_LIBRARIES(svcScmCommon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@@ -73,6 +76,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScmClient
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
|
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcScmClient
|
NGL_TARGET_LINK_LIBRARIES(svcScmClient
|
||||||
@@ -101,6 +105,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScmServer
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
|
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcScmServer
|
NGL_TARGET_LINK_LIBRARIES(svcScmServer
|
||||||
|
|||||||
@@ -23,5 +23,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSmoDummy
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_INSTALL_TARGET(svcSmoDummy)
|
NGL_INSTALL_TARGET(svcSmoDummy)
|
||||||
@@ -23,5 +23,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcMapDummy
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_INSTALL_TARGET(svcMapDummy)
|
NGL_INSTALL_TARGET(svcMapDummy)
|
||||||
@@ -28,8 +28,10 @@ IF(BUILD_RTI)
|
|||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
# Generate *.cpp/*.hpp from idl
|
# Generate *.cpp/*.hpp from idl
|
||||||
RTIDDSGEN(SRCS_common srp_enums.idl)
|
IF(BUILD_RTI)
|
||||||
RTIDDSGEN(SRCS_common srp.idl)
|
RTIDDSGEN(SRCS_common srp_enums.idl)
|
||||||
|
RTIDDSGEN(SRCS_common srp.idl)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
# Generate srp_dt[s,c]_types.h, srp_ft[s,c]_types.h
|
# Generate srp_dt[s,c]_types.h, srp_ft[s,c]_types.h
|
||||||
IF(BUILD_RTI)
|
IF(BUILD_RTI)
|
||||||
@@ -46,6 +48,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpCommon
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcSrpCommon
|
NGL_TARGET_LINK_LIBRARIES(svcSrpCommon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@@ -74,6 +77,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpClient
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
|
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcSrpClient
|
NGL_TARGET_LINK_LIBRARIES(svcSrpClient
|
||||||
@@ -102,6 +106,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpServer
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
|
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcSrpServer
|
NGL_TARGET_LINK_LIBRARIES(svcSrpServer
|
||||||
@@ -190,6 +195,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(SituationReplaySqlite
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_TARGET_LINK_LIBRARIES(SituationReplaySqlite
|
NGL_TARGET_LINK_LIBRARIES(SituationReplaySqlite
|
||||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrmCommon
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcSrmCommon
|
NGL_TARGET_LINK_LIBRARIES(svcSrmCommon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSomCommon
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcSomCommon
|
NGL_TARGET_LINK_LIBRARIES(svcSomCommon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@@ -75,6 +76,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSomClient
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
|
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcSomClient
|
NGL_TARGET_LINK_LIBRARIES(svcSomClient
|
||||||
@@ -104,6 +106,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSomServer
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||||
|
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||||
)
|
)
|
||||||
|
|
||||||
NGL_TARGET_LINK_LIBRARIES(svcSomServer
|
NGL_TARGET_LINK_LIBRARIES(svcSomServer
|
||||||
|
|||||||
@@ -65,5 +65,11 @@ docker run --rm \
|
|||||||
-DBUILD_ARCGIS=OFF \
|
-DBUILD_ARCGIS=OFF \
|
||||||
-DCMAKE_CXX_STANDARD=17
|
-DCMAKE_CXX_STANDARD=17
|
||||||
|
|
||||||
make -j8 ddscore ddsftccore ddsQoS ddsconnector ddsfts 2>&1 | tee build.log
|
make -j8 ddscore ddsftccore ddsQoS ddsconnector ddsfts migration_tests 2>&1 | tee build.log
|
||||||
|
|
||||||
|
# Run the CTest unit tests as an explicit validation step.
|
||||||
|
# We are already inside build4 (cd build4 above), so --test-dir is the
|
||||||
|
# current directory. --output-on-failure surfaces failing test output; a
|
||||||
|
# non-zero exit propagates through set -e and fails the container validation.
|
||||||
|
ctest --test-dir . --output-on-failure
|
||||||
"
|
"
|
||||||
@@ -96,14 +96,12 @@ if(BUILD_TESTING)
|
|||||||
# Enable Qt Meta-Object Compiler for tests with Q_OBJECT
|
# Enable Qt Meta-Object Compiler for tests with Q_OBJECT
|
||||||
set_target_properties(migration_tests PROPERTIES AUTOMOC ON)
|
set_target_properties(migration_tests PROPERTIES AUTOMOC ON)
|
||||||
|
|
||||||
target_compile_features(migration_tests PRIVATE cxx_std_23)
|
target_compile_features(migration_tests PRIVATE cxx_std_17)
|
||||||
|
|
||||||
target_include_directories(migration_tests PRIVATE
|
target_include_directories(migration_tests PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/include
|
${CMAKE_SOURCE_DIR}/include
|
||||||
${CMAKE_SOURCE_DIR}/qt6-after/qt6-migrated-legatus
|
${CMAKE_SOURCE_DIR}/DDS
|
||||||
${CMAKE_SOURCE_DIR}/qt6-after/qt6-migrated-legatus/include
|
|
||||||
${CMAKE_SOURCE_DIR}/qt6-after/qt6-migrated-legatus/DDS
|
|
||||||
${CMAKE_BINARY_DIR}/Lts/Common
|
${CMAKE_BINARY_DIR}/Lts/Common
|
||||||
${CMAKE_BINARY_DIR}/Lts/Common/CodeGen
|
${CMAKE_BINARY_DIR}/Lts/Common/CodeGen
|
||||||
${CMAKE_BINARY_DIR}/Lts/Common/LtsTimeline
|
${CMAKE_BINARY_DIR}/Lts/Common/LtsTimeline
|
||||||
@@ -133,7 +131,7 @@ endif()
|
|||||||
if(BUILD_GRANTLEE)
|
if(BUILD_GRANTLEE)
|
||||||
target_link_libraries(migration_tests PRIVATE codegen_grantlee)
|
target_link_libraries(migration_tests PRIVATE codegen_grantlee)
|
||||||
target_include_directories(migration_tests PRIVATE
|
target_include_directories(migration_tests PRIVATE
|
||||||
${CMAKE_SOURCE_DIR}/qt6-after/qt6-migrated-legatus/Lts/Common/CodeGen
|
${CMAKE_SOURCE_DIR}/Lts/Common/CodeGen
|
||||||
)
|
)
|
||||||
message(STATUS "Migration tests: Grantlee support enabled")
|
message(STATUS "Migration tests: Grantlee support enabled")
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in new issue
Block a user