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 / "test",
|
||||
ROOT / "qt6-after" / "qt6-migrated-benchmark" / "tests",
|
||||
ROOT / "qt6-after" / "qt6-migrated-legatus" / "tests",
|
||||
]
|
||||
CPP_EXTENSIONS = {".c", ".cc", ".cpp", ".cxx", ".h", ".hh", ".hpp", ".hxx"}
|
||||
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()
|
||||
PROJECT(LTS VERSION ${_ver})
|
||||
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)
|
||||
if(MIGRATE_MODULE STREQUAL "")
|
||||
add_subdirectory(${subdir})
|
||||
|
||||
@@ -114,11 +114,11 @@ IF(BUILD_GRANTLEE AND TARGET KF6::TextTemplate)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(codegen_grantlee
|
||||
PRIVATE
|
||||
KF6::TextTemplate
|
||||
NGLLogger
|
||||
ProjectConfig
|
||||
PUBLIC
|
||||
codegen_base
|
||||
KF6::TextTemplate
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(codegen_grantlee
|
||||
PUBLIC
|
||||
|
||||
@@ -23,5 +23,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScrDummy
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcScrDummy)
|
||||
@@ -28,8 +28,10 @@ IF(BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common scm_enums.idl)
|
||||
RTIDDSGEN(SRCS_common scm.idl)
|
||||
IF(BUILD_RTI)
|
||||
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
|
||||
IF(BUILD_RTI)
|
||||
@@ -45,6 +47,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScmCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcScmCommon
|
||||
PRIVATE
|
||||
@@ -73,6 +76,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScmClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(svcScmClient
|
||||
@@ -101,6 +105,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcScmServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(svcScmServer
|
||||
|
||||
@@ -23,5 +23,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSmoDummy
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcSmoDummy)
|
||||
@@ -23,5 +23,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcMapDummy
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_INSTALL_TARGET(svcMapDummy)
|
||||
@@ -28,8 +28,10 @@ IF(BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common srp_enums.idl)
|
||||
RTIDDSGEN(SRCS_common srp.idl)
|
||||
IF(BUILD_RTI)
|
||||
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
|
||||
IF(BUILD_RTI)
|
||||
@@ -46,6 +48,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSrpCommon
|
||||
PRIVATE
|
||||
@@ -74,6 +77,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSrpClient
|
||||
@@ -102,6 +106,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSrpServer
|
||||
@@ -190,6 +195,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(SituationReplaySqlite
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/..
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(SituationReplaySqlite
|
||||
$<IF:$<TARGET_EXISTS:ddsconnector>,ddsconnector,>
|
||||
|
||||
@@ -43,6 +43,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSrmCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSrmCommon
|
||||
PRIVATE
|
||||
|
||||
@@ -47,6 +47,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSomCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSomCommon
|
||||
PRIVATE
|
||||
@@ -75,6 +76,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSomClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSomClient
|
||||
@@ -104,6 +106,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcSomServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${CMAKE_SOURCE_DIR}/forward-declarations
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(svcSomServer
|
||||
|
||||
@@ -65,5 +65,11 @@ docker run --rm \
|
||||
-DBUILD_ARCGIS=OFF \
|
||||
-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
|
||||
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
|
||||
${CMAKE_SOURCE_DIR}
|
||||
${CMAKE_SOURCE_DIR}/include
|
||||
${CMAKE_SOURCE_DIR}/qt6-after/qt6-migrated-legatus
|
||||
${CMAKE_SOURCE_DIR}/qt6-after/qt6-migrated-legatus/include
|
||||
${CMAKE_SOURCE_DIR}/qt6-after/qt6-migrated-legatus/DDS
|
||||
${CMAKE_SOURCE_DIR}/DDS
|
||||
${CMAKE_BINARY_DIR}/Lts/Common
|
||||
${CMAKE_BINARY_DIR}/Lts/Common/CodeGen
|
||||
${CMAKE_BINARY_DIR}/Lts/Common/LtsTimeline
|
||||
@@ -133,7 +131,7 @@ endif()
|
||||
if(BUILD_GRANTLEE)
|
||||
target_link_libraries(migration_tests PRIVATE codegen_grantlee)
|
||||
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")
|
||||
endif()
|
||||
|
||||
Reference in new issue
Block a user