diff --git a/cogl/tests/conform/meson.build b/cogl/tests/conform/meson.build deleted file mode 100644 index 6162775dd..000000000 --- a/cogl/tests/conform/meson.build +++ /dev/null @@ -1,86 +0,0 @@ -cogl_test_conformance_sources = [ - 'test-conform-main.c', -] - -#unported = [ -# "test-viewport.c", -# "test-multitexture.c", -# "test-npot-texture.c", -# "test-object.c", -# "test-readpixels.c", -# "test-texture-mipmaps.c", -# "test-texture-pixmap-x11.c",", -#] - -cogl_test_conformance_includes = [ - cogl_includepath, - cogl_test_fixtures_includepath, -] - -if have_installed_tests - cogl_installed_tests_cdata = configuration_data() - cogl_installed_tests_cdata.set('libexecdir', libexecdir) - cogl_installed_tests_cdata.set('apiversion', libmutter_api_version) - - configure_file( - input: 'mutter-cogl.test.in', - output: 'mutter-cogl.test', - configuration: cogl_installed_tests_cdata, - install: true, - install_dir: mutter_installed_tests_datadir, - ) -endif - -libmutter_cogl_test_conformance = executable('test-conformance', - sources: cogl_test_conformance_sources, - c_args: cogl_debug_c_args + [ - '-DCOGL_ENABLE_EXPERIMENTAL_API', - '-DCOGL_DISABLE_DEPRECATED', - '-DCOGL_DISABLE_DEPRECATION_WARNINGS', - '-DTESTS_DATADIR="@0@/tests/data"'.format(cogl_srcdir), - ], - include_directories: cogl_test_conformance_includes, - dependencies: [ - libmutter_cogl_dep, - libmutter_cogl_test_fixtures_dep, - ], - install: have_installed_tests, - install_dir: cogl_installed_tests_libexecdir, - install_rpath: pkglibdir, -) - -find_unit_tests = find_program('meson/find-conform-unit-tests.sh') -test_conform_main = files(join_paths(meson.current_source_dir(), 'test-conform-main.c')) -cogl_conform_unit_tests = custom_target('cogl-tests-conform-unit-tests', - output: 'unit-tests', - input: test_conform_main, - command: [find_unit_tests, '@INPUT@', '@OUTPUT@'], - install: have_installed_tests, - install_dir: cogl_installed_tests_libexecdir, -) - -cogl_conformance_tests = run_command( - find_unit_tests, test_conform_main, '/dev/stdout', - check: true, -).stdout().strip().split('\n') - -foreach test_target: cogl_conformance_tests - name_parts = [] - foreach part: test_target.split('_') - if part != 'test' - name_parts += [part] - endif - endforeach - - test_name = '-'.join(name_parts) - test(test_name, cogl_run_tests, - suite: ['cogl', 'cogl/conform'], - env: ['RUN_TESTS_QUIET=1'], - args: [ - cogl_config_env, - libmutter_cogl_test_conformance, - test_target - ], - is_parallel: false, - ) -endforeach diff --git a/cogl/tests/conform/meson/find-conform-unit-tests.sh b/cogl/tests/conform/meson/find-conform-unit-tests.sh deleted file mode 100755 index 3c42b0a89..000000000 --- a/cogl/tests/conform/meson/find-conform-unit-tests.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -inputfile="$1" -outputfile="$2" - -sed -n -e 's/^ \{1,\}ADD_TEST *( *\([a-zA-Z0-9_]\{1,\}\).*/\1/p' "$inputfile" | while read -r test; do - echo "$test" >> "$outputfile" -done diff --git a/cogl/tests/conform/mutter-cogl.test.in b/cogl/tests/conform/mutter-cogl.test.in deleted file mode 100644 index 0546d15af..000000000 --- a/cogl/tests/conform/mutter-cogl.test.in +++ /dev/null @@ -1,6 +0,0 @@ -[Test] -Type=session -# Can't use TestEnvironment for COGL_TEST_VERBOSE until there's a solution -# for https://gitlab.gnome.org/GNOME/gnome-desktop-testing/-/issues/1, -# and anyway we'd still need to use the shell to 'cd' -Exec=sh -ec "export COGL_TEST_VERBOSE=1; cd @libexecdir@/installed-tests/mutter-@apiversion@/cogl/conform; xvfb-run -a -s '+iglx -noreset' ./run-tests.sh ./config.env ./test-conformance ./unit-tests" diff --git a/cogl/tests/conform/test-conform-main.c b/cogl/tests/conform/test-conform-main.c deleted file mode 100644 index df89197cd..000000000 --- a/cogl/tests/conform/test-conform-main.c +++ /dev/null @@ -1,78 +0,0 @@ -#include "cogl-config.h" - -#include - -#include -#include -#include -#include - -#include "test-declarations.h" -#include "test-utils.h" - -/* A bit of sugar for adding new conformance tests */ -#define ADD_TEST(FUNC, REQUIREMENTS, KNOWN_FAIL_REQUIREMENTS) \ - G_STMT_START { \ - if (strcmp (#FUNC, argv[1]) == 0) \ - { \ - if (test_utils_init (REQUIREMENTS, KNOWN_FAIL_REQUIREMENTS) \ - || g_getenv ("COGL_TEST_TRY_EVERYTHING") != NULL) \ - { \ - FUNC (); \ - test_utils_fini (); \ - exit (0); \ - } \ - else \ - { \ - exit (1); \ - } \ - } \ - } G_STMT_END - -#define UNPORTED_TEST(FUNC) - -int -main (int argc, char **argv) -{ - int i; - - if (argc != 2) - { - g_printerr ("usage %s UNIT_TEST\n", argv[0]); - exit (1); - } - - /* Just for convenience in case people try passing the wrapper - * filenames for the UNIT_TEST argument we normalize '-' characters - * to '_' characters... */ - for (i = 0; argv[1][i]; i++) - { - if (argv[1][i] == '-') - argv[1][i] = '_'; - } - - /* This file is run through a sed script during the make step so the - * lines containing the tests need to be formatted on a single line - * each. - */ - - UNPORTED_TEST (test_object); - UNPORTED_TEST (test_fixed); - UNPORTED_TEST (test_materials); - UNPORTED_TEST (test_readpixels); - - UNPORTED_TEST (test_multitexture); - UNPORTED_TEST (test_texture_mipmaps); - UNPORTED_TEST (test_texture_rectangle); - UNPORTED_TEST (test_texture_pixmap_x11); - - UNPORTED_TEST (test_vertex_buffer_contiguous); - UNPORTED_TEST (test_vertex_buffer_interleved); - UNPORTED_TEST (test_vertex_buffer_mutability); - - UNPORTED_TEST (test_viewport); - - g_printerr ("Unknown test name \"%s\"\n", argv[1]); - - return 1; -} diff --git a/cogl/tests/conform/test-declarations.h b/cogl/tests/conform/test-declarations.h deleted file mode 100644 index 3faa4effc..000000000 --- a/cogl/tests/conform/test-declarations.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef COGL_TEST_DECLARATIONS_H -#define COGL_TEST_DECLARATIONS_H - -void test_path (void); -void test_path_clip (void); -void test_depth_test (void); -void test_backface_culling (void); -void test_gles2_context (void); -void test_gles2_context_fbo (void); -void test_gles2_context_copy_tex_image (void); - -#endif /* COGL_TEST_DECLARATIONS_H */ diff --git a/cogl/tests/conform/test-fixtures.c b/cogl/tests/conform/test-fixtures.c deleted file mode 100644 index 218b36ff1..000000000 --- a/cogl/tests/conform/test-fixtures.c +++ /dev/null @@ -1,12 +0,0 @@ - -#include -#include - -void -test_simple_rig (void) -{ - ClutterColor stage_color = { 0x0, 0x0, 0x0, 0xff }; - stage = clutter_stage_get_default (); - - clutter_actor_set_background_color (CLUTTER_ACTOR (stage), &stage_color); -} diff --git a/cogl/tests/meson.build b/cogl/tests/meson.build index 0d76c8bc9..12a8494d3 100644 --- a/cogl/tests/meson.build +++ b/cogl/tests/meson.build @@ -18,5 +18,4 @@ cogl_config_env = configure_file( install_dir: cogl_installed_tests_libexecdir, ) -subdir('conform') subdir('unit') diff --git a/src/tests/cogl/conform/meson.build b/src/tests/cogl/conform/meson.build index 03781774c..e076733a5 100644 --- a/src/tests/cogl/conform/meson.build +++ b/src/tests/cogl/conform/meson.build @@ -41,6 +41,16 @@ cogl_tests = [ [ 'test-fence', [] ], ] +#unported = [ +# "test-multitexture", +# "test-npot-texture", +# "test-object", +# "test-readpixels", +# "test-texture-mipmaps", +# "test-texture-pixmap-x11", +# "test-viewport", +#] + cogl_test_conformance_includes = [ tests_includepath, cogl_includepath, diff --git a/cogl/tests/conform/test-multitexture.c b/src/tests/cogl/conform/test-multitexture.c similarity index 100% rename from cogl/tests/conform/test-multitexture.c rename to src/tests/cogl/conform/test-multitexture.c diff --git a/cogl/tests/conform/test-object.c b/src/tests/cogl/conform/test-object.c similarity index 100% rename from cogl/tests/conform/test-object.c rename to src/tests/cogl/conform/test-object.c diff --git a/cogl/tests/conform/test-readpixels.c b/src/tests/cogl/conform/test-readpixels.c similarity index 100% rename from cogl/tests/conform/test-readpixels.c rename to src/tests/cogl/conform/test-readpixels.c diff --git a/cogl/tests/conform/test-texture-mipmaps.c b/src/tests/cogl/conform/test-texture-mipmaps.c similarity index 100% rename from cogl/tests/conform/test-texture-mipmaps.c rename to src/tests/cogl/conform/test-texture-mipmaps.c diff --git a/cogl/tests/conform/test-texture-pixmap-x11.c b/src/tests/cogl/conform/test-texture-pixmap-x11.c similarity index 100% rename from cogl/tests/conform/test-texture-pixmap-x11.c rename to src/tests/cogl/conform/test-texture-pixmap-x11.c diff --git a/cogl/tests/conform/test-viewport.c b/src/tests/cogl/conform/test-viewport.c similarity index 100% rename from cogl/tests/conform/test-viewport.c rename to src/tests/cogl/conform/test-viewport.c