cogl: Remove now empty conform test suite
All working tests have already migrated to the test suite using mutter; move the old unported tests over too, and remove the conform test framework, as it is no longer used. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2555>
This commit is contained in:
parent
5d40a5eeea
commit
4ebaa433ee
@ -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
|
@ -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
|
@ -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"
|
@ -1,78 +0,0 @@
|
||||
#include "cogl-config.h"
|
||||
|
||||
#include <cogl/cogl.h>
|
||||
|
||||
#include <glib.h>
|
||||
#include <locale.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#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;
|
||||
}
|
@ -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 */
|
@ -1,12 +0,0 @@
|
||||
|
||||
#include <clutter/clutter.h>
|
||||
#include <cogl/cogl.h>
|
||||
|
||||
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);
|
||||
}
|
@ -18,5 +18,4 @@ cogl_config_env = configure_file(
|
||||
install_dir: cogl_installed_tests_libexecdir,
|
||||
)
|
||||
|
||||
subdir('conform')
|
||||
subdir('unit')
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user