File: tests-Mark-view-verification-tests-as-incomplete-in-big-e.patch

package info (click to toggle)
mutter 48.4-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 50,240 kB
  • sloc: ansic: 376,779; xml: 3,703; python: 3,060; sh: 391; ruby: 167; makefile: 61; javascript: 26
file content (48 lines) | stat: -rw-r--r-- 1,828 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From: =?utf-8?b?Ik1hcmNvIFRyZXZpc2FuIChUcmV2acOxbyki?= <mail@3v1n0.net>
Date: Tue, 15 Jun 2021 20:38:01 +0200
Subject: tests: Mark view-verification tests as incomplete in big-endian
 archs

Saved pixmaps are invalid in big-endian architectures, so let's disable
the tests for now, checking only the basic metadata but not comparing
the contents.

Bug: https://gitlab.gnome.org/GNOME/mutter/-/issues/1850
Applied-upstream: no, this is a workaround
---
 src/tests/meta-ref-test-utils.c | 5 +++++
 src/tests/ref-test-sanity.c     | 5 +++++
 2 files changed, 10 insertions(+)

diff --git a/src/tests/meta-ref-test-utils.c b/src/tests/meta-ref-test-utils.c
index daf543b..3ede046 100644
--- a/src/tests/meta-ref-test-utils.c
+++ b/src/tests/meta-ref-test-utils.c
@@ -374,6 +374,11 @@ meta_ref_test_verify (MetaRefTestAdaptor  adaptor,
       g_assert_cmpint (ref_status, ==, CAIRO_STATUS_SUCCESS);
       ensure_expected_format (&ref_image);
 
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+  g_test_incomplete ("View comparison is not supported by this architecture");
+  return;
+#endif
+
       if (!compare_images (ref_image, image, &gl_fuzz,
                            &diff_stat))
         {
diff --git a/src/tests/ref-test-sanity.c b/src/tests/ref-test-sanity.c
index 90268b4..83265ac 100644
--- a/src/tests/ref-test-sanity.c
+++ b/src/tests/ref-test-sanity.c
@@ -108,6 +108,11 @@ meta_test_ref_test_sanity (void)
   clutter_actor_set_background_color (actor2, &COGL_COLOR_INIT (52, 101, 164, 255));
   clutter_actor_add_child (stage, actor2);
 
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+  g_test_incomplete ("View comparison is not supported by this architecture");
+  return;
+#endif
+
   g_test_expect_message ("libmutter-test",
                          G_LOG_LEVEL_CRITICAL,
                          "Pixel difference exceeds limits*");