One unit-test/ directory per module/target, mirroring the existing TetraIF/unit-test/ layout (one QtTest executable per module, guarded by BUILD_TESTING and the module target, each registered with ctest): Lts/Common/CodeGen codegen_unit_test Lts/Common/LtsCoordinate ltscoordinate_unit_test Lts/Common/LtsSession ltssession_unit_test Lts/DDS/Core ddscore_unit_test Lts/DDS/QosProfile ddsqos_unit_test Lts/Tools/LogViewer logviewer_unit_test Lts/Tools/SqlBrowser sqlbrowser_unit_test Z/src/NGLLogger ngllogger_unit_test Z/src/WMS_Interface wms_json_ds_unit_test Z/src/nglapplication nglcoreapplication_unit_test Z/src/nglcompression nglcompression_unit_test Z/src/nglsettings nglsettings_unit_test Z/src/ngltranslator ngltranslator_unit_test Where a module is built with hidden visibility and has no export macro (LogViewer, SqlBrowser, ngltranslator, NGLLogger, nglcompression, nglsettings), its sources are compiled directly into the test executable, the same pattern as prtcnv_unit_test. ctest baseline in the container (QT_QPA_PLATFORM=offscreen): 20/23 passed (13 new + 7 pre-existing in-scope tests), 3 Not Run as before (nglcomp_test, GrantleeParserSmoke, utils_test). README: ctest baseline table extended to the 23 registered tests and section 2.4 now documents the per-module test layout. ddsview has no unit test (GUI tool, XmlHelper needs the DDS dynamic-xtypes runtime).
72 lines
1.3 KiB
CMake
Executable File
72 lines
1.3 KiB
CMake
Executable File
#
|
|
# $Id$
|
|
# $HeadURL$
|
|
# $Author$
|
|
# Created by Malte Schroeder, SLSE, 2016-03-03
|
|
#
|
|
|
|
# Make ${Qt6_Widgets} optional
|
|
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Widgets)
|
|
set(Qt6_Widgets ${Qt6_Widgets})
|
|
else()
|
|
set(Qt6_Widgets "")
|
|
endif()
|
|
|
|
|
|
set(CMAKE_AUTOUIC_SEARCH_PATHS ${CMAKE_CURRENT_SOURCE_DIR}/ui)
|
|
|
|
SET(logView_SRCS
|
|
cmbfilterwidget.h
|
|
datafilterwidget.cpp
|
|
datafilterwidget.h
|
|
datefilterwidget.cpp
|
|
datefilterwidget.h
|
|
filterwidget.cpp
|
|
filterwidget.h
|
|
levelfilterwidget.cpp
|
|
levelfilterwidget.h
|
|
locationfilterwidget.cpp
|
|
locationfilterwidget.h
|
|
loggerfilterwidget.cpp
|
|
loggerfilterwidget.h
|
|
logviewtablemodel.cpp
|
|
logviewtablemodel.h
|
|
logviewtableview.cpp
|
|
logviewtableview.h
|
|
lefilterwidget.cpp
|
|
lefilterwidget.h
|
|
main.cpp
|
|
mainwindow.cpp
|
|
mainwindow.h
|
|
sortfiltermodel.cpp
|
|
sortfiltermodel.h
|
|
)
|
|
|
|
NGL_WRAP_UI(logView_SRCS
|
|
ui/mainwindow.ui
|
|
ui/datafilterwidget.ui
|
|
ui/datefilterwidget.ui
|
|
ui/levelfilterwidget.ui
|
|
ui/locationfilterwidget.ui
|
|
ui/loggerfilterwidget.ui
|
|
)
|
|
|
|
NGL_ADD_EXECUTABLE(TOOLSSV NO_TRANSLATION LogViewer ${logView_SRCS})
|
|
|
|
if(QT6_GUI_AVAILABLE)
|
|
NGL_TARGET_LINK_LIBRARIES(LogViewer
|
|
${Qt6_Widgets}
|
|
Qt6::Core
|
|
nglapplication
|
|
nglwidgets
|
|
NGLLogger
|
|
)
|
|
endif()
|
|
|
|
NGL_INSTALL_TARGET(LogViewer)
|
|
|
|
#
|
|
# Unit tests
|
|
#
|
|
ADD_SUBDIRECTORY(unit-test)
|