Merge wayland tests with other tests

This makes wayland tests organization consistent with other kwin tests.
wilder/Plasma/6.2
Vlad Zahorodnii 2 years ago
parent d57c66872c
commit 7d56aa3687
  1. 1
      autotests/CMakeLists.txt
  2. 0
      autotests/wayland/CMakeLists.txt
  3. 11
      autotests/wayland/client/CMakeLists.txt
  4. 0
      autotests/wayland/client/test_datadevice.cpp
  5. 0
      autotests/wayland/client/test_datasource.cpp
  6. 0
      autotests/wayland/client/test_drag_drop.cpp
  7. 0
      autotests/wayland/client/test_error.cpp
  8. 0
      autotests/wayland/client/test_plasma_activities.cpp
  9. 0
      autotests/wayland/client/test_plasma_virtual_desktop.cpp
  10. 0
      autotests/wayland/client/test_plasmashell.cpp
  11. 0
      autotests/wayland/client/test_pointer_constraints.cpp
  12. 0
      autotests/wayland/client/test_selection.cpp
  13. 0
      autotests/wayland/client/test_server_side_decoration.cpp
  14. 0
      autotests/wayland/client/test_server_side_decoration_palette.cpp
  15. 0
      autotests/wayland/client/test_shadow.cpp
  16. 0
      autotests/wayland/client/test_shm_pool.cpp
  17. 0
      autotests/wayland/client/test_text_input_v2.cpp
  18. 0
      autotests/wayland/client/test_wayland_appmenu.cpp
  19. 0
      autotests/wayland/client/test_wayland_blur.cpp
  20. 0
      autotests/wayland/client/test_wayland_contrast.cpp
  21. 0
      autotests/wayland/client/test_wayland_filter.cpp
  22. 0
      autotests/wayland/client/test_wayland_output.cpp
  23. 0
      autotests/wayland/client/test_wayland_seat.cpp
  24. 0
      autotests/wayland/client/test_wayland_slide.cpp
  25. 0
      autotests/wayland/client/test_wayland_subsurface.cpp
  26. 0
      autotests/wayland/client/test_wayland_surface.cpp
  27. 0
      autotests/wayland/client/test_wayland_windowmanagement.cpp
  28. 0
      autotests/wayland/client/test_xdg_decoration.cpp
  29. 0
      autotests/wayland/client/test_xdg_foreign.cpp
  30. 0
      autotests/wayland/client/test_xdg_output.cpp
  31. 0
      autotests/wayland/client/test_xdg_shell.cpp
  32. 6
      autotests/wayland/server/CMakeLists.txt
  33. 0
      autotests/wayland/server/test_datacontrol_interface.cpp
  34. 0
      autotests/wayland/server/test_display.cpp
  35. 0
      autotests/wayland/server/test_inputmethod_interface.cpp
  36. 0
      autotests/wayland/server/test_keyboard_shortcuts_inhibitor_interface.cpp
  37. 0
      autotests/wayland/server/test_layershellv1_interface.cpp
  38. 0
      autotests/wayland/server/test_no_xdg_runtime_dir.cpp
  39. 0
      autotests/wayland/server/test_screencast.cpp
  40. 0
      autotests/wayland/server/test_seat.cpp
  41. 0
      autotests/wayland/server/test_tablet_interface.cpp
  42. 0
      autotests/wayland/server/test_textinputv1_interface.cpp
  43. 0
      autotests/wayland/server/test_textinputv3_interface.cpp
  44. 0
      autotests/wayland/server/test_viewporter_interface.cpp
  45. 5
      src/wayland/CMakeLists.txt
  46. 65
      src/wayland/tests/CMakeLists.txt
  47. 64
      tests/CMakeLists.txt
  48. 0
      tests/copyclient.cpp
  49. 0
      tests/dpmstest.cpp
  50. 0
      tests/fakeoutput.cpp
  51. 0
      tests/fakeoutput.h
  52. 0
      tests/paneltest.cpp
  53. 0
      tests/pasteclient.cpp
  54. 0
      tests/plasmasurfacetest.cpp
  55. 16
      tests/renderingservertest.cpp
  56. 0
      tests/shadowtest.cpp
  57. 0
      tests/subsurfacetest.cpp
  58. 0
      tests/touchclienttest.cpp
  59. 0
      tests/touchclienttest.h
  60. 10
      tests/waylandservertest.cpp
  61. 0
      tests/xdgforeigntest.cpp
  62. 0
      tests/xdgtest.cpp

@ -3,6 +3,7 @@ remove_definitions(-DQT_USE_QSTRINGBUILDER)
add_subdirectory(libkwineffects)
add_subdirectory(integration)
add_subdirectory(libinput)
add_subdirectory(wayland)
# drm autotests are broken on FreeBSD for yet unknown reasons
# As the test isn't doing anything platform specific, only run it on Linux
if(CMAKE_SYSTEM_NAME MATCHES "Linux")

@ -3,7 +3,7 @@
########################################################
set( testWaylandOutput_SRCS
test_wayland_output.cpp
../../tests/fakeoutput.cpp
${PROJECT_SOURCE_DIR}/tests/fakeoutput.cpp
)
add_executable(testWaylandOutput ${testWaylandOutput_SRCS})
target_link_libraries( testWaylandOutput Qt::Test Qt::Gui KF6::WaylandClient kwin Wayland::Client Wayland::Server)
@ -15,7 +15,7 @@ ecm_mark_as_test(testWaylandOutput)
########################################################
set( testWaylandSurface_SRCS
test_wayland_surface.cpp
../../tests/fakeoutput.cpp
${PROJECT_SOURCE_DIR}/tests/fakeoutput.cpp
)
add_executable(testWaylandSurface ${testWaylandSurface_SRCS})
target_link_libraries( testWaylandSurface Qt::Test Qt::Gui KF6::WaylandClient kwin Wayland::Client Wayland::Server)
@ -217,7 +217,10 @@ ecm_mark_as_test(testXdgForeign)
########################################################
# Test XdgShell
########################################################
set(testXdgShell_SRCS test_xdg_shell.cpp ../../tests/fakeoutput.cpp)
set(testXdgShell_SRCS
test_xdg_shell.cpp
${PROJECT_SOURCE_DIR}/tests/fakeoutput.cpp
)
add_executable(testXdgShell ${testXdgShell_SRCS})
target_link_libraries( testXdgShell Qt::Test Qt::Gui kwin KF6::WaylandClient Wayland::Client)
add_test(NAME kwayland-testXdgShell COMMAND testXdgShell)
@ -294,7 +297,7 @@ ecm_mark_as_test(testPlasmaActivities)
########################################################
set( testXdgOutput_SRCS
test_xdg_output.cpp
../../tests/fakeoutput.cpp
${PROJECT_SOURCE_DIR}/tests/fakeoutput.cpp
)
add_executable(testXdgOutput ${testXdgOutput_SRCS})
target_link_libraries( testXdgOutput Qt::Test Qt::Gui KF6::WaylandClient kwin Wayland::Client Wayland::Server)

@ -92,7 +92,11 @@ qt6_generate_wayland_protocol_client_sources(testInputMethodInterface
FILES
${WaylandProtocols_DATADIR}/unstable/input-method/input-method-unstable-v1.xml
)
target_sources(testInputMethodInterface PRIVATE test_inputmethod_interface.cpp ../../tests/fakeoutput.cpp ${INPUTMETHOD_SRCS})
target_sources(testInputMethodInterface PRIVATE
test_inputmethod_interface.cpp
${PROJECT_SOURCE_DIR}/tests/fakeoutput.cpp
${INPUTMETHOD_SRCS}
)
target_link_libraries(testInputMethodInterface Qt::Test kwin KF6::WaylandClient Wayland::Client)
add_test(NAME kwayland-testInputMethodInterface COMMAND testInputMethodInterface)
ecm_mark_as_test(testInputMethodInterface)

@ -1,10 +1,5 @@
add_subdirectory(tools)
if (BUILD_TESTING)
add_subdirectory(autotests)
add_subdirectory(tests)
endif()
# CMake has a known bug where target_source() doesn't work as expected with files generated
# in a directory other than the one where the target is defined. It should be fixed in 3.20.
add_library(WaylandProtocols_xml OBJECT)

@ -1,65 +0,0 @@
include(ECMMarkAsTest)
# find_package(Qt6Core ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENT Private _check_private)
include_directories(SYSTEM ${Qt6Core_PRIVATE_INCLUDE_DIRS})
set(testServer_SRCS
waylandservertest.cpp
fakeoutput.cpp
)
add_executable(testServer ${testServer_SRCS})
target_link_libraries(testServer kwin Qt::CorePrivate)
ecm_mark_as_test(testServer)
find_package(Qt6Widgets ${QT_MIN_VERSION} CONFIG QUIET)
if (TARGET Qt::Widgets)
set(testRenderingServer_SRCS
renderingservertest.cpp
fakeoutput.cpp
)
add_executable(testRenderingServer ${testRenderingServer_SRCS})
target_link_libraries(testRenderingServer kwin Qt::Core Qt::Widgets)
ecm_mark_as_test(testRenderingServer)
endif()
add_executable(copyClient copyclient.cpp)
target_link_libraries(copyClient KF6::WaylandClient)
ecm_mark_as_test(copyClient)
add_executable(pasteClient pasteclient.cpp)
target_link_libraries(pasteClient Qt::Core KF6::WaylandClient)
ecm_mark_as_test(pasteClient)
add_executable(touchClientTest touchclienttest.cpp)
target_link_libraries(touchClientTest KF6::WaylandClient)
add_executable(panelTest paneltest.cpp)
target_link_libraries(panelTest KF6::WaylandClient)
ecm_mark_as_test(panelTest)
add_executable(subsurface-test subsurfacetest.cpp)
target_link_libraries(subsurface-test Qt::Core Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(subsurface-test)
add_executable(shadowTest shadowtest.cpp)
target_link_libraries(shadowTest KF6::WaylandClient)
ecm_mark_as_test(shadowTest)
if (TARGET Qt::Widgets)
add_executable(dpmsTest dpmstest.cpp)
target_link_libraries(dpmsTest KF6::WaylandClient Qt::Widgets)
ecm_mark_as_test(dpmsTest)
endif()
add_executable(plasmasurface-test plasmasurfacetest.cpp)
target_link_libraries(plasmasurface-test Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(plasmasurface-test)
add_executable(xdgforeign-test xdgforeigntest.cpp)
target_link_libraries(xdgforeign-test Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(xdgforeign-test)
add_executable(xdg-test xdgtest.cpp)
target_link_libraries(xdg-test Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(xdg-test)

@ -25,3 +25,67 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_executable(xdgactivationtest-qt6 xdgactivationtest-qt6.cpp)
target_link_libraries(xdgactivationtest-qt6 Qt6::Widgets)
include(ECMMarkAsTest)
# find_package(Qt6Core ${QT_MIN_VERSION} CONFIG REQUIRED COMPONENT Private _check_private)
include_directories(SYSTEM ${Qt6Core_PRIVATE_INCLUDE_DIRS})
set(testServer_SRCS
waylandservertest.cpp
fakeoutput.cpp
)
add_executable(testServer ${testServer_SRCS})
target_link_libraries(testServer kwin Qt::CorePrivate)
ecm_mark_as_test(testServer)
find_package(Qt6Widgets ${QT_MIN_VERSION} CONFIG QUIET)
if (TARGET Qt::Widgets)
set(testRenderingServer_SRCS
renderingservertest.cpp
fakeoutput.cpp
)
add_executable(testRenderingServer ${testRenderingServer_SRCS})
target_link_libraries(testRenderingServer kwin Qt::Core Qt::Widgets)
ecm_mark_as_test(testRenderingServer)
endif()
add_executable(copyClient copyclient.cpp)
target_link_libraries(copyClient KF6::WaylandClient)
ecm_mark_as_test(copyClient)
add_executable(pasteClient pasteclient.cpp)
target_link_libraries(pasteClient Qt::Core KF6::WaylandClient)
ecm_mark_as_test(pasteClient)
add_executable(touchClientTest touchclienttest.cpp)
target_link_libraries(touchClientTest KF6::WaylandClient)
add_executable(panelTest paneltest.cpp)
target_link_libraries(panelTest KF6::WaylandClient)
ecm_mark_as_test(panelTest)
add_executable(subsurface-test subsurfacetest.cpp)
target_link_libraries(subsurface-test Qt::Core Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(subsurface-test)
add_executable(shadowTest shadowtest.cpp)
target_link_libraries(shadowTest KF6::WaylandClient)
ecm_mark_as_test(shadowTest)
if (TARGET Qt::Widgets)
add_executable(dpmsTest dpmstest.cpp)
target_link_libraries(dpmsTest KF6::WaylandClient Qt::Widgets)
ecm_mark_as_test(dpmsTest)
endif()
add_executable(plasmasurface-test plasmasurfacetest.cpp)
target_link_libraries(plasmasurface-test Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(plasmasurface-test)
add_executable(xdgforeign-test xdgforeigntest.cpp)
target_link_libraries(xdgforeign-test Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(xdgforeign-test)
add_executable(xdg-test xdgtest.cpp)
target_link_libraries(xdg-test Qt::Gui KF6::WaylandClient)
ecm_mark_as_test(xdg-test)

@ -4,15 +4,15 @@
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "../compositor.h"
#include "../datadevicemanager.h"
#include "../display.h"
#include "../keyboard.h"
#include "../output.h"
#include "../pointer.h"
#include "../seat.h"
#include "../xdgshell.h"
#include "core/graphicsbufferview.h"
#include "wayland/compositor.h"
#include "wayland/datadevicemanager.h"
#include "wayland/display.h"
#include "wayland/keyboard.h"
#include "wayland/output.h"
#include "wayland/pointer.h"
#include "wayland/seat.h"
#include "wayland/xdgshell.h"
#include "fakeoutput.h"

@ -3,11 +3,11 @@
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "../compositor.h"
#include "../display.h"
#include "../output.h"
#include "../seat.h"
#include "../xdgshell.h"
#include "wayland/compositor.h"
#include "wayland/display.h"
#include "wayland/output.h"
#include "wayland/seat.h"
#include "wayland/xdgshell.h"
#include "fakeoutput.h"
Loading…
Cancel
Save