[mutter] tests/cogl: Migrate read texture formats test



commit ddb982ba6e3f7e4a2ad5460df196a7b30e627ad3
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Thu Aug 4 20:25:41 2022 +0200

    tests/cogl: Migrate read texture formats test
    
    This test fails on gl and gl3, but not on gles2; mark is at such.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>

 cogl/tests/conform/meson.build                                   | 1 -
 cogl/tests/conform/test-conform-main.c                           | 1 -
 cogl/tests/conform/test-declarations.h                           | 1 -
 src/tests/cogl/conform/meson.build                               | 1 +
 .../tests => src/tests/cogl}/conform/test-read-texture-formats.c | 9 ++++++---
 5 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build
index 27416c480a..0d8dbee8ea 100644
--- a/cogl/tests/conform/meson.build
+++ b/cogl/tests/conform/meson.build
@@ -1,6 +1,5 @@
 cogl_test_conformance_sources = [
   'test-conform-main.c',
-  'test-read-texture-formats.c',
   'test-write-texture-formats.c',
   'test-point-size.c',
   'test-point-size-attribute.c',
diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c
index ada56fc95a..97dd465b67 100644
--- a/cogl/tests/conform/test-conform-main.c
+++ b/cogl/tests/conform/test-conform-main.c
@@ -68,7 +68,6 @@ main (int argc, char **argv)
   UNPORTED_TEST (test_texture_rectangle);
   UNPORTED_TEST (test_texture_pixmap_x11);
   ADD_TEST (test_texture_get_set_data, 0, 0);
-  ADD_TEST (test_read_texture_formats, 0, TEST_KNOWN_FAILURE);
   ADD_TEST (test_write_texture_formats, 0, 0);
   ADD_TEST (test_alpha_textures, 0, 0);
 
diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h
index d6c0588b2a..0cbdbb6155 100644
--- a/cogl/tests/conform/test-declarations.h
+++ b/cogl/tests/conform/test-declarations.h
@@ -8,7 +8,6 @@ void test_backface_culling (void);
 void test_layer_remove (void);
 void test_npot_texture (void);
 void test_texture_get_set_data (void);
-void test_read_texture_formats (void);
 void test_write_texture_formats (void);
 void test_alpha_textures (void);
 void test_framebuffer_get_bits (void);
diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build
index c04c20c77b..23837e92e3 100644
--- a/src/tests/cogl/conform/meson.build
+++ b/src/tests/cogl/conform/meson.build
@@ -18,6 +18,7 @@ cogl_tests = [
   [ 'test-journal', [] ],
   [ 'test-primitive', [] ],
   [ 'test-sparse-pipeline', [] ],
+  [ 'test-read-texture-formats', ['gl', 'gl3'] ],
 ]
 
 cogl_test_conformance_includes = [
diff --git a/cogl/tests/conform/test-read-texture-formats.c 
b/src/tests/cogl/conform/test-read-texture-formats.c
similarity index 97%
rename from cogl/tests/conform/test-read-texture-formats.c
rename to src/tests/cogl/conform/test-read-texture-formats.c
index 9add8127db..3098bc70bc 100644
--- a/cogl/tests/conform/test-read-texture-formats.c
+++ b/src/tests/cogl/conform/test-read-texture-formats.c
@@ -1,8 +1,7 @@
 #include <cogl/cogl.h>
 #include <stdarg.h>
 
-#include "test-declarations.h"
-#include "test-utils.h"
+#include "tests/cogl-test-utils.h"
 
 /*
  * This tests reading back an RGBA texture in all of the available
@@ -159,7 +158,7 @@ test_read_int (CoglTexture2D *tex_2d,
   g_free (expected_value_str);
 }
 
-void
+static void
 test_read_texture_formats (void)
 {
   CoglTexture2D *tex_2d;
@@ -221,3 +220,7 @@ test_read_texture_formats (void)
   if (cogl_test_verbose ())
     g_print ("OK\n");
 }
+
+COGL_TEST_SUITE (
+  g_test_add_func ("/read-texture-formats", test_read_texture_formats);
+)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]