Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,6 @@ add_definitions(-DKF5_HIGHLIGHT_PATH=\"${KF5_HIGHLIGHT_INSTALL_PATH}\")
add_subdirectory(src)

option(BUILD_TESTS "Build unit tests" ON)
if(BUILD_TESTS)
if(BUILD_TESTS AND NOT CMAKE_BUILD_TYPE STREQUAL "Release")
add_subdirectory(tests)
endif()
2 changes: 1 addition & 1 deletion tests/app_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,6 @@ target_link_libraries(test_editorapplication PRIVATE
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(test_editorapplication PRIVATE gcov)
endif()
gtest_discover_tests(test_editorapplication PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_editorapplication PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)

message(STATUS "UT: app_ut module configured (test_editorapplication, links startmanager_ut_src)")
2 changes: 1 addition & 1 deletion tests/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function(add_ut_target TARGET_NAME)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(${TARGET_NAME} PRIVATE gcov)
endif()
gtest_discover_tests(${TARGET_NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(${TARGET_NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
message(STATUS "UT: ${TARGET_NAME} configured")
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion tests/common2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(test_common2 PRIVATE gcov)
endif()

gtest_discover_tests(test_common2 PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_common2 PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)

message(STATUS "UT: test_common2 configured with ${TEST_SOURCES}")
2 changes: 1 addition & 1 deletion tests/controls_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(test_controls_ut PRIVATE gcov)
endif()

gtest_discover_tests(test_controls_ut PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_controls_ut PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)

message(STATUS "UT: controls_ut configured with ${TEST_SOURCES}")
2 changes: 1 addition & 1 deletion tests/daemon_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function(daemon_ut_add_test TARGET_NAME TEST_SOURCE)
daemon_ut_src
GTest::gtest
GTest::gtest_main)
gtest_discover_tests(${TARGET_NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(${TARGET_NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
endfunction()

daemon_ut_add_test(test_daemon_utils test_utils.cpp)
Expand Down
2 changes: 1 addition & 1 deletion tests/editor_areas/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ function(ea_add_test name)
GTest::gtest
GTest::gtest_main
Qt6::Test)
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
message(STATUS "UT: test_${name} configured")
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion tests/editor_core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function(ec_add_test name)
GTest::gtest
GTest::gtest_main
Qt6::Test)
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
message(STATUS "UT: test_${name} configured")
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion tests/editor_markdown/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function(md_add_test name)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(test_${name} PRIVATE gcov)
endif()
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
message(STATUS "UT: test_${name} configured")
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion tests/editor_undo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function(eu_add_test name)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(test_${name} PRIVATE gcov)
endif()
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_${name} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
message(STATUS "UT: test_${name} configured")
endfunction()

Expand Down
2 changes: 1 addition & 1 deletion tests/editor_wrapper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(test_editwrapper PRIVATE gcov)
endif()

gtest_discover_tests(test_editwrapper PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_editwrapper PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)

message(STATUS "UT: test_editwrapper configured (B8, links startmanager_ut_src)")
6 changes: 3 additions & 3 deletions tests/startmanager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ target_link_libraries(test_startmanager_drag PRIVATE
GTest::gtest
GTest::gtest_main)

gtest_discover_tests(test_startmanager PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_filetabinfo PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_startmanager_drag PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_startmanager PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
gtest_discover_tests(test_filetabinfo PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
gtest_discover_tests(test_startmanager_drag PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)

message(STATUS "UT: startmanager module configured (test_startmanager, test_filetabinfo, test_startmanager_drag)")
2 changes: 1 addition & 1 deletion tests/thememodule/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(test_thememodule PRIVATE gcov)
endif()

gtest_discover_tests(test_thememodule PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(test_thememodule PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)

message(STATUS "UT: thememodule configured with ${TEST_SOURCES}")
2 changes: 1 addition & 1 deletion tests/widgets_ut/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function(add_widgets_ut_target NAME)
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
target_link_libraries(${NAME} PRIVATE gcov)
endif()
gtest_discover_tests(${NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
gtest_discover_tests(${NAME} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen" DISCOVERY_TIMEOUT 30)
endfunction()

add_widgets_ut_target(test_ddropdownmenu)
Expand Down
Loading