mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
dedc2766d2
There are a lot of ways to build and run mutter. Let's try to document them and reduce the tribal knowledge. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3465>
1.5 KiB
1.5 KiB
Debugging
Reproducing CI test failures locally
-
Create a podman that can run gdb locally using the same image used in CI. The example below uses the tag
x86_64-2022-01-20
but this will depend on the image used by the failed CI job. The Fedora version may also differ.podman pull registry.gitlab.gnome.org/gnome/mutter/fedora/35:x86_64-2022-01-20 podman run -t -i --cap-add=SYS_PTRACE registry.gitlab.gnome.org/gnome/mutter/fedora/35:x86_64-2022-01-20 bash -l
-
Clone, build and install mutter inside the container
git clone https://gitlab.gnome.org/[your-user]/mutter.git -b [merge-request-branch] cd mutter meson build ninja -C build install
-
Install debug utilities
dnf install -y gdb
-
Replicate a environment and run the test inside gdb. What you need here depends on the test that needs investigation. In the simplest case, the following is enough:
export XDG_RUNTIME_DIR=$PWD/runtime-dir mkdir -p $XDG_RUNTIME_DIR ./src/tests/meta-dbus-runner.py xvfb-run meson test -C build --setup plain --gdb failing-test-case
The need for
xvfb-run
depends on whether the test case uses the nested backend or the headless backend.If it involves screen casting, it becomes a bit more complicated:
export XDG_RUNTIME_DIR=$PWD/runtime-dir mkdir -p $XDG_RUNTIME_DIR ./src/tests/meta-dbus-runner.py bash -l pipewire& wireplumber& meson test -C build --setup plain --gdb failing-test-case