Files
RedBear-OS/local/recipes/kde/kwin/source/doc/TESTING.md
T
vasilito 7aeb3bb475 build: capture build script auto-stash changes from 0.2.5 kernel/relibc/base build
The build-redbear.sh script auto-stashes working tree changes
in nested relibc and base source trees before running the
build. These changes were captured by the failed kernel
build attempt that hit the json-target-spec / kernel rust
toolchain mismatch (fixed in 0.2.5 by creating the local
0.2.5 branch).

Captured changes:
- local/recipes/kde/* : KDE Frameworks 6 source CMakeLists
  whitespace changes from the autostash (preserved)
- local/recipes/qt/qtbase/* : qtypes.h whitespace from the
  autostash (preserved)
- local/sources/kernel/Cargo.lock : dependency lock from
  the kernel relibc rebuild attempt
- local/sources/kernel/src/lib.rs : touched (mtime) by the
  build script's touch + make prefix command

This is a bookkeeping commit — the actual code changes
for the threading plan are on the 4 submodule branches
(kernel, relibc, base, libredox) and will be pushed
separately.

0.2.5 branch was created from 0.2.4 (HEAD cd3950072e) to
continue Phase 0 of the multi-threading plan work in a
clean branch.
2026-07-02 13:41:03 +03:00

1.9 KiB

Testing in KWin

KWin provides a unit and integration test suite for X11 and Wayland. The source code for the tests can be found in the subdirectory autotests. The test suite should be run prior to any merge to KWin.

Dependencies

The following additional software needs to be installed for running the test suite:

  • Xvfb
  • Xephyr
  • glxgears
  • DMZ-white cursor theme
  • breeze window decoration

Preparing OpenGL

Some of the tests require OpenGL. The test suite is implemented against Mesa and uses the Mesa specific EGL extension EGL_MESA_platform_surfaceless. This extension supports rendering without any real GPU using llvmpipe as software emulation. This gives the tests a stable base removing variance introduced by different hardware and drivers.

Users of non-Mesa drivers (e.g. proprietary NVIDIA driver) need to ensure that Mesa is also installed. If your system uses libglvnd this should work out of the box, if not you might need to tune LD_LIBRARY_PATH.

Preventing side effects

To prevent side effects with the running session it is recommended to run tests in a dedicated dbus session. This can be achieved by prefixing the test command with dbus-run-session, as shown in the examples below.

Running tests

Tests are more likely to succeed when run from ssh, as the environment is further isolated from the user's session. For example:

ssh localhost

Then, run the tests as described below.

Running the test suite

The test suite can be run from the build directory. Best is to do:

cd path/to/build/directory
dbus-run-session xvfb-run ctest

Running individual tests

All tests executables are created in the directory "bin" in the build directory. Each test can be executed by just starting it from within the test directory:

cd path/to/build/directory/bin
dbus-run-session ./testFoo

For tests relying on X11 one should also either start a dedicated Xvfb and export DISPLAY or use xvfb-run as described above.