Subject: [PATCH gnome-team 2/2] gnu: mutter: Fix tests.

From: Liliana Marie Prikler <[email-masked]>
Date: Wed, 12 Feb 2025 21:10:01 +0100

* gnu/packages/gnome.scm (mutter)[#:test-options]: Add “--no-suite” options
for “mutter/x11” and “mutter/backends/native”.
[#:phases]<disable-failing-tests>: Disable ‘monitor-unit’ test.
Drop code disabling nonexistent ‘native-headless’ and ‘timeline’ tests.
---
 gnu/packages/gnome.scm | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm
index 8bb08ab99d..8237d956c4 100644
--- a/gnu/packages/gnome.scm
+++ b/gnu/packages/gnome.scm
@@ -8121,7 +8121,9 @@ (define-public mutter
          "-Degl_device=true"            ;false by default
          "-Dwayland_eglstream=true"     ;false by default
          (string-append "-Dudev_dir=" #$output "/lib/udev"))
-      #:test-options '(list "--verbose")
+      #:test-options '(list "--verbose"
+                            "--no-suite" "mutter/x11"
+                            "--no-suite" "mutter/backends/native")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'unpack 'use-RUNPATH-instead-of-RPATH
@@ -8142,18 +8144,13 @@ (define-public mutter
                       (string-append #$output "/lib/udev"))))
           (add-after 'unpack 'disable-problematic-tests
             (lambda _
-              ;; The native-headless test hangs due to attempting to use audio,
-              ;; unavailable in the container.
-              ;; Note: the following sed expression deletes the whole test(...)
-              ;; expression paragraph.  For an explanation, see: info '(sed)
-              ;; Multiline techniques'.
-              (invoke "sed" "/./{H;$!d} ; x ; s/^.*native-headless.*$//"
+              ;; The monitor-unit test is flaky.
+              ;; Note: the following sed expression deletes the whole test
+              ;; JSON(ish) block.
+              ;; For an explanation, see: info '(sed) Multiline techniques'
+              ;; and info '(sed) Addresses overview'.
+              (invoke "sed" "/}/!{H;$!d} ; x ; s/^.*monitor-unit.*$//"
                       "-i" "src/tests/meson.build")
-              ;; Timeline tests may unexpectedly fail on missed frames, so
-              ;; let's disable them as well.
-              ;; See <https://gitlab.gnome.org/GNOME/mutter/-/issues/2125>
-              (substitute* "src/tests/clutter/conform/meson.build"
-                (("'timeline.*',") ""))
 
               ;; On i686-linux this test fails with a dbus error.  This seems
               ;; to be fine in later versions, so this workaround can probably
-- 
2.48.1