Commit 369de5f4 authored by Emmanuele Bassi's avatar Emmanuele Bassi

meson: Add conformance test suite

Require that we're running under the X11 backend, as it the test suite
breaks under Wayland.
parent 1f9ab173
SUBDIRS = accessibility conform interactive micro-bench performance
EXTRA_DIST = README clutter-1.0.suppressions
valgrinddir = $(datadir)/clutter-1.0/valgrind
valgrind_DATA = clutter.supp
EXTRA_DIST = README
test_cflags = [
'-DG_LOG_DOMAIN="Clutter-Conform"',
'-DCOGL_DISABLE_DEPRECATION_WARNINGS',
]
test_env = [
'G_ENABLE_DIAGNOSTIC=0',
'CLUTTER_ENABLE_DIAGNOSTIC=0',
'CLUTTER_BACKEND=x11',
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
]
actor_tests = [
'actor-anchors',
'actor-destroy',
'actor-graph',
'actor-invariants',
'actor-iter',
'actor-layout',
'actor-meta',
'actor-offscreen-limit-max-size',
'actor-offscreen-redirect',
'actor-paint-opacity',
'actor-pick',
'actor-shader-effect',
'actor-size',
]
classes_tests = [
'text',
]
general_tests = [
'binding-pool',
'color',
'events-touch',
'interval',
'model',
'script-parser',
'units',
]
deprecated_tests = [
'animator',
'behaviours',
'group',
'rectangle',
'texture',
]
conformance_suites = [
[ 'actor', actor_tests ],
[ 'classes', classes_tests ],
[ 'general', general_tests ],
[ 'deprecated', deprecated_tests ],
]
installed_test_bindir = join_paths(clutter_libexecdir, 'installed-tests', meson.project_name())
installed_test_datadir = join_paths(clutter_datadir, 'installed-tests', meson.project_name())
foreach suite: conformance_suites
suite_name = suite[0]
suite_tests = suite[1]
foreach t: suite_tests
test_name = t
test_source = t + '.c'
test_data_conf = configuration_data()
test_data_conf.set('test_bin', join_paths(installed_test_bindir, test_name))
test_data = configure_file(
input: 'test.data.in',
output: t + '.test',
configuration: test_data_conf,
install: true,
install_dir: installed_test_datadir,
)
test_bin = executable(test_name,
test_source,
c_args: test_cflags,
dependencies: [ libclutter_dep, mathlib_dep ],
install: true,
install_dir: installed_test_bindir,
)
test(t, test_bin,
suite: suite_name,
env: test_env,
)
endforeach
endforeach
......@@ -127,6 +127,9 @@ script_child (void)
gboolean focus_ret;
gchar *test_file;
g_type_ensure (TEST_TYPE_GROUP);
g_type_ensure (TEST_TYPE_GROUP_META);
test_file = g_test_build_filename (G_TEST_DIST, "scripts", "test-script-child.json", NULL);
clutter_script_load_from_file (script, test_file, &error);
if (g_test_verbose () && error)
......
[Test]
Type=session
Exec=env G_ENABLE_DIAGNOSTIC=0 CLUTTER_ENABLE_DIAGNOSTIC=0 @test_bin@
subdir('conform')
subdir('accessibility')
subdir('interactive')
subdir('micro-bench')
subdir('performance')
install_data([
'clutter.supp',
],
install_dir: join_paths(clutter_datadir, clutter_api_name, 'valgrind'),
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment