From 9ac2da99d6c01f827a0377647921737a59445bd8 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Tue, 19 Dec 2023 15:08:49 +0100 Subject: [PATCH] docs/building-and-running: Add note about updating ref-tests Part-of: --- doc/building-and-running.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/doc/building-and-running.md b/doc/building-and-running.md index ff39d7bed..1d79a5d46 100644 --- a/doc/building-and-running.md +++ b/doc/building-and-running.md @@ -65,6 +65,15 @@ $ toolbox enter mutter ⬢ meson test -C builddir --print-errorlogs --suite mutter/tty ``` +## Updating Ref-Tests + +Ref-tests compare image captures of Mutter against a reference image. Sometimes a change of the rendering result is expected with some code changes. In those cases it's required to update the reference images. This can be done by running the tests with: +```sh +MESA_LOADER_DRIVER_OVERRIDE=swrast MUTTER_REF_TEST_UPDATE='/path/to/test/case' +``` + +This makes sure a software renderer is being used and the reference image of the test case `/path/to/test/case` is updated. More information is available in `src/tests/meta-ref-test.c`. + ## Running a nested instance While the test suite helps to catch mistakes, there are a lot of cases where we actually need to run and interact with Mutter. The least invasive method is running a "nested" instance.