summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/cmake/CMakeLists.txt')
-rw-r--r--tests/auto/cmake/CMakeLists.txt69
1 files changed, 68 insertions, 1 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt
index d64e180870..86db954086 100644
--- a/tests/auto/cmake/CMakeLists.txt
+++ b/tests/auto/cmake/CMakeLists.txt
@@ -116,7 +116,7 @@ include("${_Qt6CTestMacros}")
# Qt::Gui is the prerequisite for all Android tests.
if(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS AND NOT NO_GUI)
unset(multi_abi_vars)
- foreach(abi IN_LISTS QT_ANDROID_ABIS)
+ foreach(abi IN LISTS QT_ANDROID_ABIS)
list(APPEND multi_abi_vars "-DQT_PATH_ANDROID_ABI_${abi}=${QT_PATH_ANDROID_ABI_${abi}}")
endforeach()
if(QT_ANDROID_BUILD_ALL_ABIS)
@@ -146,6 +146,21 @@ if(QT_BUILD_MINIMAL_ANDROID_MULTI_ABI_TESTS AND NOT NO_GUI)
"-DTEST_ESCAPING_VALUE_ARG=${escaping_value}"
"-DTEST_SPACES_VALUE_ARG=${spaces_value}"
)
+
+ #Run test_android_aar only if the host is Unix and zipinfo is available
+ find_program(ZIPINFO_EXECUTABLE zipinfo)
+ if(CMAKE_HOST_UNIX AND ZIPINFO_EXECUTABLE)
+ _qt_internal_test_expect_pass(test_android_aar
+ BUILD_OPTIONS
+ ${multi_abi_vars}
+ --build-target verify_aar
+ )
+ else()
+ message(WARNING
+ "Skipping test_android_aar CMake build test because \
+ the host is not Unix or zipinfo is not found")
+ endif()
+
return()
endif()
@@ -197,6 +212,7 @@ endif()
_qt_internal_test_expect_pass(test_add_resource_prefix BINARY test_add_resource_prefix)
_qt_internal_test_expect_build_fail(test_add_resource_options)
_qt_internal_test_expect_build_fail(test_wrap_cpp_options)
+_qt_internal_test_expect_pass(test_wrap_cpp_moc)
_qt_internal_test_expect_pass(test_platform_defs_include)
_qt_internal_test_expect_pass(test_qtmainwin_library)
@@ -222,6 +238,7 @@ _qt_internal_test_expect_pass(test_multiple_find_package)
_qt_internal_test_expect_pass(test_add_resources_delayed_file)
_qt_internal_test_expect_pass(test_add_binary_resources_delayed_file BINARY test_add_binary_resources_delayed_file)
_qt_internal_test_expect_pass(test_qt_add_resources_rebuild)
+_qt_internal_test_expect_pass(test_resource_without_obj_lib BINARY test_resource_without_obj_lib)
if(NOT NO_GUI)
_qt_internal_test_expect_pass(test_private_includes)
@@ -337,6 +354,12 @@ if(is_qt_build_platform)
set_tests_properties(test_import_plugins PROPERTIES FIXTURES_REQUIRED build_mockplugins)
endif()
+if(NOT NO_GUI)
+ _qt_internal_test_expect_pass(test_standalone_test
+ BINARY "${CMAKE_CTEST_COMMAND}"
+ BINARY_ARGS "-V")
+endif()
+
_qt_internal_test_expect_pass(test_versionless_targets)
if(NOT NO_GUI)
@@ -388,3 +411,47 @@ if(WIN32 OR (APPLE AND NOT IOS) OR is_desktop_linux)
else()
_qt_internal_test_expect_fail(${deploy_args})
endif()
+
+_qt_internal_test_expect_pass(test_config_expressions)
+_qt_internal_test_expect_pass(test_QTP0003)
+
+if(NOT NO_GUI)
+ _qt_internal_test_expect_pass(test_collecting_plugins)
+endif()
+
+_qt_internal_test_expect_pass(test_qt_manual_moc)
+
+# check if the os is opensuse. If it is, we need to skip tests due to CI problems
+set(is_opensuse FALSE)
+if(UNIX)
+ if(EXISTS "/etc/os-release")
+ file(STRINGS "/etc/os-release" os_release_content)
+ foreach(line IN LISTS os_release_content)
+ if(line MATCHES "openSUSE" OR line MATCHES "opensuse")
+ set(is_opensuse TRUE)
+ break()
+ endif()
+ endforeach()
+ endif()
+endif()
+
+if(NOT QNX AND NOT WASM AND NOT (WIN32 AND QT_BUILD_MINIMAL_STATIC_TESTS)
+ AND NOT is_opensuse)
+ # Since our CI machines are slow, ctest --build-and-test buffers the output
+ # of the configure step of a test, and the fact that we run all the test
+ # logic in the configure step, we need to divide the tests into smaller
+ # chunks to avoid CI stdout timeout errors.
+ # See https://gitlab.kitware.com/cmake/cmake/-/issues/25790
+ _qt_internal_test_expect_pass(test_qt_add_ui_common)
+ _qt_internal_test_expect_pass(test_qt_add_ui_1)
+ _qt_internal_test_expect_pass(test_qt_add_ui_2)
+ _qt_internal_test_expect_pass(test_qt_add_ui_3)
+ _qt_internal_test_expect_pass(test_qt_add_ui_4)
+ _qt_internal_test_expect_pass(test_qt_add_ui_5)
+ _qt_internal_test_expect_pass(test_qt_add_ui_6)
+ _qt_internal_test_expect_pass(test_qt_add_ui_7)
+ _qt_internal_test_expect_pass(test_qt_add_ui_8)
+ _qt_internal_test_expect_pass(test_qt_add_ui_9)
+ _qt_internal_test_expect_pass(test_qt_add_ui_10)
+endif()
+