Skip to content

Commit 6b471b5

Browse files
authored
run all Qt-based tests (in CI) (#6916)
tests which require a display are now run with the `offscreen` platform plugin.
1 parent 2995c4b commit 6b471b5

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

Diff for: gui/test/resultstree/CMakeLists.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
3131
endif()
3232

3333
if (REGISTER_GUI_TESTS)
34-
# TODO: does not work in the CI
35-
# add_test(NAME test-resultstree COMMAND $<TARGET_FILE:test-resultstree>)
34+
# TODO: might crash - see #13223
35+
#add_test(NAME test-resultstree COMMAND $<TARGET_FILE:test-resultstree> -platform offscreen)
3636
endif()
3737

3838
add_dependencies(gui-tests test-resultstree)

Diff for: gui/test/translationhandler/CMakeLists.txt

+1-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
1616
endif()
1717

1818
if (REGISTER_GUI_TESTS)
19-
# TODO: requires X session - run with QT_QPA_PLATFORM=offscreen?
20-
#add_test(NAME test-translationhandler COMMAND $<TARGET_FILE:test-translationhandler>)
19+
add_test(NAME test-translationhandler COMMAND $<TARGET_FILE:test-translationhandler> -platform offscreen)
2120
endif()
2221

2322
add_dependencies(gui-tests test-translationhandler)

Diff for: gui/test/translationhandler/testtranslationhandler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ static QStringList getTranslationNames(const TranslationHandler& handler)
3636
void TestTranslationHandler::construct() const
3737
{
3838
TranslationHandler handler;
39-
QCOMPARE(getTranslationNames(handler).size(), 13); // 12 translations + english
39+
QCOMPARE(getTranslationNames(handler).size(), 15); // 14 translations + english
4040
QCOMPARE(handler.getCurrentLanguage(), QString("en"));
4141
}
4242

0 commit comments

Comments
 (0)