Warning, /plasma/kwin/autotests/integration/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 add_subdirectory(helper) 0002 0003 add_library(KWinIntegrationTestFramework SHARED) 0004 if (QT_MAJOR_VERSION EQUAL "5") 0005 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0006 PROTOCOL ${WaylandProtocols_DATADIR}/unstable/input-method/input-method-unstable-v1.xml 0007 BASENAME input-method-unstable-v1 0008 ) 0009 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0010 PROTOCOL ${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v3.xml 0011 BASENAME text-input-unstable-v3 0012 ) 0013 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0014 PROTOCOL protocols/wlr-layer-shell-unstable-v1.xml 0015 BASENAME wlr-layer-shell-unstable-v1 0016 ) 0017 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0018 PROTOCOL ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml 0019 BASENAME xdg-shell 0020 ) 0021 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0022 PROTOCOL ${WaylandProtocols_DATADIR}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml 0023 BASENAME xdg-decoration-unstable-v1 0024 ) 0025 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0026 PROTOCOL ${WaylandProtocols_DATADIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml 0027 BASENAME idle-inhibit-unstable-v1 0028 ) 0029 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0030 PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-device-v2.xml 0031 BASENAME kde-output-device-v2 0032 ) 0033 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0034 PROTOCOL ${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-management-v2.xml 0035 BASENAME kde-output-management-v2 0036 ) 0037 ecm_add_qtwayland_client_protocol(KWinIntegrationTestFramework 0038 PROTOCOL ${WaylandProtocols_DATADIR}/staging/fractional-scale/fractional-scale-v1.xml 0039 BASENAME fractional-scale-v1 0040 ) 0041 else() 0042 qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework 0043 NO_INCLUDE_CORE_ONLY 0044 FILES 0045 ${WaylandProtocols_DATADIR}/unstable/input-method/input-method-unstable-v1.xml 0046 ) 0047 qt6_generate_wayland_protocol_client_sources(KWinIntegrationTestFramework 0048 FILES 0049 ${WaylandProtocols_DATADIR}/unstable/text-input/text-input-unstable-v3.xml 0050 ${CMAKE_CURRENT_SOURCE_DIR}/protocols/wlr-layer-shell-unstable-v1.xml 0051 ${WaylandProtocols_DATADIR}/stable/xdg-shell/xdg-shell.xml 0052 ${WaylandProtocols_DATADIR}/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml 0053 ${WaylandProtocols_DATADIR}/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml 0054 ${WaylandProtocols_DATADIR}/staging/fractional-scale/fractional-scale-v1.xml 0055 ${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-device-v2.xml 0056 ${PLASMA_WAYLAND_PROTOCOLS_DIR}/kde-output-management-v2.xml 0057 ) 0058 endif() 0059 0060 target_sources(KWinIntegrationTestFramework PRIVATE 0061 ../../src/cursor.cpp 0062 0063 generic_scene_opengl_test.cpp 0064 kwin_wayland_test.cpp 0065 test_helpers.cpp 0066 ) 0067 target_link_libraries(KWinIntegrationTestFramework 0068 PUBLIC 0069 Qt::Test 0070 KF5::WaylandClient 0071 Wayland::Client 0072 kwin 0073 0074 PRIVATE 0075 # Own libraries 0076 KWinXwaylandServerModule 0077 0078 # Static plugins 0079 KWinQpaPlugin 0080 KF5GlobalAccelKWinPlugin 0081 KF5WindowSystemKWinPlugin 0082 KF5IdleTimeKWinPlugin 0083 ) 0084 kcoreaddons_target_static_plugins(KWinIntegrationTestFramework "kwin/effects/plugins" LINK_OPTION "PRIVATE") 0085 set_target_properties(KWinIntegrationTestFramework PROPERTIES CXX_VISIBILITY_PRESET default) 0086 0087 function(integrationTest) 0088 set(optionArgs WAYLAND_ONLY) 0089 set(oneValueArgs NAME) 0090 set(multiValueArgs SRCS LIBS) 0091 cmake_parse_arguments(ARGS "${optionArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) 0092 add_executable(${ARGS_NAME} ${ARGS_SRCS}) 0093 target_link_libraries(${ARGS_NAME} KWinIntegrationTestFramework Qt::Test ${ARGS_LIBS}) 0094 add_test(NAME kwin-${ARGS_NAME} COMMAND dbus-run-session ${CMAKE_BINARY_DIR}/bin/${ARGS_NAME}) 0095 if (${ARGS_WAYLAND_ONLY}) 0096 add_executable(${ARGS_NAME}_waylandonly ${ARGS_SRCS} ) 0097 set_target_properties(${ARGS_NAME}_waylandonly PROPERTIES COMPILE_DEFINITIONS "NO_XWAYLAND") 0098 target_link_libraries(${ARGS_NAME}_waylandonly KWinIntegrationTestFramework Qt::Test ${ARGS_LIBS}) 0099 add_test(NAME kwin-${ARGS_NAME}-waylandonly COMMAND dbus-run-session ${CMAKE_BINARY_DIR}/bin/${ARGS_NAME}_waylandonly) 0100 endif() 0101 endfunction() 0102 0103 integrationTest(NAME testDontCrashGlxgears SRCS dont_crash_glxgears.cpp) 0104 if (KWIN_BUILD_SCREENLOCKER) 0105 integrationTest(NAME testLockScreen SRCS lockscreen.cpp) 0106 endif() 0107 integrationTest(WAYLAND_ONLY NAME testDecorationInput SRCS decoration_input_test.cpp) 0108 integrationTest(WAYLAND_ONLY NAME testInternalWindow SRCS internal_window.cpp) 0109 integrationTest(WAYLAND_ONLY NAME testTouchInput SRCS touch_input_test.cpp) 0110 integrationTest(WAYLAND_ONLY NAME testInputStackingOrder SRCS input_stacking_order.cpp) 0111 integrationTest(NAME testPointerInput SRCS pointer_input.cpp) 0112 integrationTest(NAME testPlatformCursor SRCS platformcursor.cpp) 0113 integrationTest(WAYLAND_ONLY NAME testDontCrashCancelAnimation SRCS dont_crash_cancel_animation.cpp) 0114 integrationTest(WAYLAND_ONLY NAME testTransientPlacement SRCS transient_placement.cpp) 0115 integrationTest(NAME testDebugConsole SRCS debug_console_test.cpp) 0116 integrationTest(NAME testDontCrashEmptyDeco SRCS dont_crash_empty_deco.cpp) 0117 integrationTest(WAYLAND_ONLY NAME testPlasmaSurface SRCS plasma_surface_test.cpp) 0118 integrationTest(WAYLAND_ONLY NAME testMaximized SRCS maximize_test.cpp) 0119 integrationTest(WAYLAND_ONLY NAME testXdgShellWindow SRCS xdgshellwindow_test.cpp) 0120 integrationTest(WAYLAND_ONLY NAME testDontCrashNoBorder SRCS dont_crash_no_border.cpp) 0121 integrationTest(NAME testXwaylandSelections SRCS xwayland_selections_test.cpp) 0122 integrationTest(WAYLAND_ONLY NAME testSceneOpenGL SRCS scene_opengl_test.cpp ) 0123 integrationTest(WAYLAND_ONLY NAME testSceneOpenGLES SRCS scene_opengl_es_test.cpp ) 0124 integrationTest(WAYLAND_ONLY NAME testScreenChanges SRCS screen_changes_test.cpp) 0125 integrationTest(NAME testModiferOnlyShortcut SRCS modifier_only_shortcut_test.cpp) 0126 if (KWIN_BUILD_TABBOX) 0127 integrationTest(WAYLAND_ONLY NAME testTabBox SRCS tabbox_test.cpp) 0128 endif() 0129 integrationTest(WAYLAND_ONLY NAME testWindowSelection SRCS window_selection_test.cpp) 0130 integrationTest(WAYLAND_ONLY NAME testPointerConstraints SRCS pointer_constraints_test.cpp) 0131 integrationTest(WAYLAND_ONLY NAME testKeyboardLayout SRCS keyboard_layout_test.cpp) 0132 integrationTest(WAYLAND_ONLY NAME testKeymapCreationFailure SRCS keymap_creation_failure_test.cpp) 0133 integrationTest(WAYLAND_ONLY NAME testShowingDesktop SRCS showing_desktop_test.cpp) 0134 integrationTest(WAYLAND_ONLY NAME testDontCrashUseractionsMenu SRCS dont_crash_useractions_menu.cpp) 0135 integrationTest(WAYLAND_ONLY NAME testKWinBindings SRCS kwinbindings_test.cpp) 0136 integrationTest(WAYLAND_ONLY NAME testLayerShellV1Window SRCS layershellv1window_test.cpp) 0137 integrationTest(WAYLAND_ONLY NAME testVirtualDesktop SRCS virtual_desktop_test.cpp) 0138 integrationTest(WAYLAND_ONLY NAME testXdgShellWindowRules SRCS xdgshellwindow_rules_test.cpp) 0139 integrationTest(WAYLAND_ONLY NAME testIdleInhibition SRCS idle_inhibition_test.cpp) 0140 integrationTest(WAYLAND_ONLY NAME testDontCrashReinitializeCompositor SRCS dont_crash_reinitialize_compositor.cpp) 0141 integrationTest(WAYLAND_ONLY NAME testNoGlobalShortcuts SRCS no_global_shortcuts_test.cpp) 0142 integrationTest(WAYLAND_ONLY NAME testBufferSizeChange SRCS buffer_size_change_test.cpp ) 0143 integrationTest(WAYLAND_ONLY NAME testPlacement SRCS placement_test.cpp) 0144 integrationTest(WAYLAND_ONLY NAME testActivation SRCS activation_test.cpp) 0145 integrationTest(WAYLAND_ONLY NAME testInputMethod SRCS inputmethod_test.cpp) 0146 integrationTest(WAYLAND_ONLY NAME testScreens SRCS screens_test.cpp) 0147 integrationTest(WAYLAND_ONLY NAME testScreenEdges SRCS screenedges_test.cpp) 0148 integrationTest(WAYLAND_ONLY NAME testOutputChanges SRCS outputchanges_test.cpp) 0149 integrationTest(WAYLAND_ONLY NAME testTiles SRCS tiles_test.cpp) 0150 integrationTest(WAYLAND_ONLY NAME testFractionalScaling SRCS fractional_scaling_test.cpp) 0151 0152 qt_add_dbus_interfaces(DBUS_SRCS ${CMAKE_BINARY_DIR}/src/org.kde.kwin.VirtualKeyboard.xml) 0153 integrationTest(WAYLAND_ONLY NAME testVirtualKeyboardDBus SRCS test_virtualkeyboard_dbus.cpp ${DBUS_SRCS}) 0154 integrationTest(WAYLAND_ONLY NAME testNightColor SRCS nightcolor_test.cpp LIBS KWinNightColorPlugin) 0155 0156 if (XCB_ICCCM_FOUND) 0157 integrationTest(NAME testMoveResize SRCS move_resize_window_test.cpp LIBS XCB::ICCCM) 0158 integrationTest(NAME testStruts SRCS struts_test.cpp LIBS XCB::ICCCM) 0159 integrationTest(NAME testShade SRCS shade_test.cpp LIBS XCB::ICCCM) 0160 integrationTest(NAME testDontCrashAuroraeDestroyDeco SRCS dont_crash_aurorae_destroy_deco.cpp LIBS XCB::ICCCM) 0161 integrationTest(NAME testPlasmaWindow SRCS plasmawindow_test.cpp LIBS XCB::ICCCM) 0162 integrationTest(NAME testScreenEdgeClientShow SRCS screenedge_client_show_test.cpp LIBS XCB::ICCCM) 0163 integrationTest(NAME testX11DesktopWindow SRCS desktop_window_x11_test.cpp LIBS XCB::ICCCM) 0164 integrationTest(NAME testXwaylandInput SRCS xwayland_input_test.cpp LIBS XCB::ICCCM) 0165 integrationTest(NAME testWindowRules SRCS window_rules_test.cpp LIBS XCB::ICCCM) 0166 integrationTest(NAME testX11Window SRCS x11_window_test.cpp LIBS XCB::ICCCM) 0167 integrationTest(NAME testQuickTiling SRCS quick_tiling_test.cpp LIBS XCB::ICCCM) 0168 integrationTest(NAME testGlobalShortcuts SRCS globalshortcuts_test.cpp LIBS XCB::ICCCM) 0169 integrationTest(NAME testStackingOrder SRCS stacking_order_test.cpp LIBS XCB::ICCCM) 0170 integrationTest(NAME testDbusInterface SRCS dbus_interface_test.cpp LIBS XCB::ICCCM) 0171 integrationTest(NAME testXwaylandServerCrash SRCS xwaylandserver_crash_test.cpp LIBS XCB::ICCCM) 0172 integrationTest(NAME testXwaylandServerRestart SRCS xwaylandserver_restart_test.cpp LIBS XCB::ICCCM) 0173 0174 if (KWIN_BUILD_ACTIVITIES) 0175 integrationTest(NAME testActivities SRCS activities_test.cpp LIBS XCB::ICCCM) 0176 endif() 0177 endif() 0178 0179 add_subdirectory(scripting) 0180 add_subdirectory(effects) 0181 add_subdirectory(fakes)