| 1 |
test_cflags = [ |
| 2 |
'-DG_LOG_DOMAIN="Clutter-Conform"', |
| 3 |
'-DCOGL_DISABLE_DEPRECATION_WARNINGS', |
| 4 |
] |
| 5 |
|
| 6 |
test_env = [ |
| 7 |
'G_ENABLE_DIAGNOSTIC=0', |
| 8 |
'CLUTTER_ENABLE_DIAGNOSTIC=0', |
| 9 |
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()), |
| 10 |
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()), |
| 11 |
] |
| 12 |
|
| 13 |
if enabled_backends.contains('x11') |
| 14 |
test_env += 'CLUTTER_BACKEND=x11' |
| 15 |
endif |
| 16 |
|
| 17 |
actor_tests = [ |
| 18 |
'actor-anchors', |
| 19 |
'actor-destroy', |
| 20 |
'actor-graph', |
| 21 |
'actor-invariants', |
| 22 |
'actor-iter', |
| 23 |
'actor-layout', |
| 24 |
'actor-meta', |
| 25 |
'actor-offscreen-limit-max-size', |
| 26 |
'actor-offscreen-redirect', |
| 27 |
'actor-paint-opacity', |
| 28 |
'actor-pick', |
| 29 |
# 'actor-shader-effect', # XXX - Fails on CI |
| 30 |
'actor-size', |
| 31 |
] |
| 32 |
|
| 33 |
classes_tests = [ |
| 34 |
'text', |
| 35 |
] |
| 36 |
|
| 37 |
general_tests = [ |
| 38 |
'binding-pool', |
| 39 |
'color', |
| 40 |
'events-touch', |
| 41 |
'interval', |
| 42 |
'model', |
| 43 |
'script-parser', |
| 44 |
'units', |
| 45 |
] |
| 46 |
|
| 47 |
deprecated_tests = [ |
| 48 |
'animator', |
| 49 |
'behaviours', |
| 50 |
'group', |
| 51 |
'rectangle', |
| 52 |
'texture', |
| 53 |
] |
| 54 |
|
| 55 |
conformance_suites = [ |
| 56 |
[ 'actor', actor_tests ], |
| 57 |
[ 'classes', classes_tests ], |
| 58 |
[ 'general', general_tests ], |
| 59 |
[ 'deprecated', deprecated_tests ], |
| 60 |
] |
| 61 |
|
| 62 |
installed_test_bindir = join_paths(clutter_libexecdir, 'installed-tests', meson.project_name()) |
| 63 |
installed_test_datadir = join_paths(clutter_datadir, 'installed-tests', meson.project_name()) |
| 64 |
|
| 65 |
foreach suite: conformance_suites |
| 66 |
suite_name = suite[0] |
| 67 |
suite_tests = suite[1] |
| 68 |
|
| 69 |
foreach t: suite_tests |
| 70 |
test_name = t |
| 71 |
test_source = t + '.c' |
| 72 |
|
| 73 |
test_data_conf = configuration_data() |
| 74 |
test_data_conf.set('test_bin', join_paths(installed_test_bindir, test_name)) |
| 75 |
|
| 76 |
test_data = configure_file( |
| 77 |
input: 'test.data.in', |
| 78 |
output: t + '.test', |
| 79 |
configuration: test_data_conf, |
| 80 |
install_dir: installed_test_datadir, |
| 81 |
) |
| 82 |
|
| 83 |
test_bin = executable(test_name, |
| 84 |
test_source, |
| 85 |
c_args: test_cflags, |
| 86 |
dependencies: [ libclutter_dep, mathlib_dep ], |
| 87 |
install: true, |
| 88 |
install_dir: installed_test_bindir, |
| 89 |
) |
| 90 |
|
| 91 |
test(t, test_bin, |
| 92 |
suite: suite_name, |
| 93 |
env: test_env, |
| 94 |
) |
| 95 |
endforeach |
| 96 |
endforeach |
| •97 |
|
| 98 |
install_subdir('scripts', |
| 99 |
install_dir: installed_test_bindir) |