testsuite: Skip known-broken tests
authorMatthias Clasen <mclasen@redhat.com>
Wed, 19 Oct 2022 03:22:15 +0000 (23:22 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 19 Oct 2022 03:22:47 +0000 (23:22 -0400)
The tiff pixbuf tests fail because of known
issues with the pixbuf tiff loader. Skip them.

Fixes: #4615
testsuite/gdk/memorytexture.c

index 126280073067c23e082f671e9781109b178da7a0..5b0b146c4abb40822086ed14498c0e5cdc4df46e 100644 (file)
@@ -114,7 +114,7 @@ encode (GdkMemoryFormat format,
   return GSIZE_TO_POINTER (method * GDK_MEMORY_N_FORMATS + format);
 }
 
-static void
+static gboolean
 decode (gconstpointer     data,
         GdkMemoryFormat *format,
         TextureMethod   *method)
@@ -125,8 +125,16 @@ decode (gconstpointer     data,
   value /= GDK_MEMORY_N_FORMATS;
 
   *method = value;
+
+  if (*method == TEXTURE_METHOD_TIFF_PIXBUF)
+    {
+      g_test_skip ("the pixbuf tiff loader is broken (gdk-pixbuf#100)");
+      return FALSE;
+    }
+
+  return TRUE;
 }
-        
+
 static void
 texture_builder_init (TextureBuilder  *builder,
                       GdkMemoryFormat  format,
@@ -537,7 +545,8 @@ test_download_1x1 (gconstpointer data)
   GdkTexture *expected, *test;
   gsize i;
 
-  decode (data, &format, &method);
+  if (!decode (data, &format, &method))
+    return;
 
   for (i = 0; i < N; i++)
     {
@@ -562,7 +571,8 @@ test_download_4x4 (gconstpointer data)
   GdkTexture *expected, *test;
   gsize i;
 
-  decode (data, &format, &method);
+  if (!decode (data, &format, &method))
+    return;
 
   for (i = 0; i < N; i++)
     {
@@ -588,7 +598,8 @@ test_download_192x192 (gconstpointer data)
   GdkTexture *expected, *test;
   GdkRGBA color;
 
-  decode (data, &format, &method);
+  if (!decode (data, &format, &method))
+    return;
 
   create_random_color (&color);
   expected = create_texture (GDK_MEMORY_DEFAULT, TEXTURE_METHOD_LOCAL, 192, 192, &color);