kwin/autotests/wayland/CMakeLists.txt

29 lines
1.3 KiB
Text
Raw Normal View History

[autotest] Welcome to integration testing KWin This is the beginning of a new testing era for KWin: finally we are able to test against a running KWin. This works by making use of the new virtual framebuffer backend for Wayland. It starts a specific Application subclass which is mostly a fork of ApplicationWayland. The individual tests are able to influence the socket name and the size of the virtual screen. This is supposed to be done in initTestCase. To know when KWin is fully started one can use the workspaceCreated signal of KWin::Application. KWin is not started in another process, but the kwin library is used, so the test has pretty much full introspection to everything going on inside KWin. It can access the Workspace, WaylandServer, fake input events through InputRedirection and so on. Once the test KWin is running it's possible to connect to it using KWayland::Client library. This allows to introspect the Workspace to see whether all worked as expected (e.g. correct stacking order, active window and so on). This first autotest is mostly meant to illustrate how to setup a test and how one can use KWayland::Client to interact with the mock KWin. For more tests it is suggested to move the connections to the Wayland server in the init() and cleanup() methods. The change also affects the qpa plugin: the specific check to only run in binaries called kwin_wayland doesn't hold any more. This can now be overwritten by an env variable. Please note that this first test will probably fail in the CI system as it might not have XWayland which is needed by KWin.
2015-10-02 13:04:57 +00:00
add_definitions(-DKWINBACKENDPATH="${CMAKE_BINARY_DIR}/backends/virtual/KWinWaylandVirtualBackend.so")
add_definitions(-DKWINQPAPATH="${CMAKE_BINARY_DIR}/plugins/qpa/")
########################################################
# Test Start
########################################################
set( testStart_SRCS start_test.cpp kwin_wayland_test.cpp )
add_executable(testStart ${testStart_SRCS})
target_link_libraries( testStart kwin Qt5::Test)
add_test(kwin-testStart testStart)
ecm_mark_as_test(testStart)
########################################################
# Transient Window without input test
########################################################
set( testTransientNoInput_SRCS transient_no_input_test.cpp kwin_wayland_test.cpp )
add_executable(testTransientNoInput ${testTransientNoInput_SRCS})
target_link_libraries( testTransientNoInput kwin Qt5::Test)
add_test(kwin-testTransientNoInput testTransientNoInput)
ecm_mark_as_test(testTransientNoInput)
########################################################
# Quick Tiling test
########################################################
set( testQuickTiling_SRCS quick_tiling_test.cpp kwin_wayland_test.cpp )
add_executable(testQuickTiling ${testQuickTiling_SRCS})
target_link_libraries( testQuickTiling kwin Qt5::Test)
add_test(kwin-testQuickTiling testQuickTiling)
ecm_mark_as_test(testQuickTiling)