2017-10-18 00:48:16 +00:00
|
|
|
testexecdir = join_paths(installed_test_bindir, 'gsk')
|
|
|
|
testdatadir = join_paths(installed_test_datadir, 'gsk')
|
|
|
|
|
2017-12-25 11:56:21 +00:00
|
|
|
compare_render = executable(
|
|
|
|
'compare-render',
|
2021-02-13 18:21:25 +00:00
|
|
|
['compare-render.c', '../reftests/reftest-compare.c'],
|
2017-12-25 11:56:21 +00:00
|
|
|
dependencies: libgtk_dep,
|
2020-05-18 09:44:38 +00:00
|
|
|
c_args: common_cflags,
|
2017-12-25 11:56:21 +00:00
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir
|
|
|
|
)
|
|
|
|
|
2019-03-19 04:29:20 +00:00
|
|
|
node_parser = executable(
|
|
|
|
'node-parser',
|
|
|
|
['node-parser.c'],
|
|
|
|
dependencies: libgtk_dep,
|
2020-05-18 09:44:38 +00:00
|
|
|
c_args: common_cflags,
|
2019-03-19 04:29:20 +00:00
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir
|
|
|
|
)
|
|
|
|
|
2019-03-19 07:16:07 +00:00
|
|
|
compare_render_tests = [
|
2019-05-09 01:56:25 +00:00
|
|
|
'blend-difference',
|
2021-04-01 21:03:54 +00:00
|
|
|
'blend-invisible-child',
|
|
|
|
'blend-normal',
|
2021-09-16 00:28:56 +00:00
|
|
|
'border-bottom-right',
|
2021-04-01 21:03:54 +00:00
|
|
|
'borders-rotated',
|
|
|
|
'borders-scaled',
|
2020-09-02 22:05:16 +00:00
|
|
|
'clip-coordinates-2d',
|
2019-03-21 05:47:36 +00:00
|
|
|
'clip-coordinates-3d',
|
2021-04-01 21:03:54 +00:00
|
|
|
'clip-in-rounded-clip1',
|
|
|
|
'clip-in-rounded-clip2',
|
|
|
|
'clip-in-rounded-clip3',
|
|
|
|
'clipped-repeat-3d-ngl',
|
2019-03-19 07:16:07 +00:00
|
|
|
'clipped_rounded_clip',
|
2021-04-01 21:03:54 +00:00
|
|
|
'clip-nested1',
|
2019-05-09 01:56:25 +00:00
|
|
|
'color-blur0',
|
2019-05-28 03:51:20 +00:00
|
|
|
'color-matrix-identity',
|
2022-05-18 19:16:33 +00:00
|
|
|
'color-matrix-parsing',
|
2019-04-24 10:48:59 +00:00
|
|
|
'cross-fade-in-opacity',
|
2021-04-01 21:00:31 +00:00
|
|
|
'css-background',
|
2019-05-20 01:32:30 +00:00
|
|
|
'empty-blend',
|
|
|
|
'empty-blur',
|
|
|
|
'empty-border',
|
2019-05-25 22:50:13 +00:00
|
|
|
'empty-cairo',
|
2019-05-20 01:32:30 +00:00
|
|
|
'empty-clip',
|
|
|
|
'empty-color',
|
|
|
|
'empty-color-matrix',
|
|
|
|
'empty-container',
|
|
|
|
'empty-cross-fade',
|
|
|
|
'empty-debug',
|
|
|
|
'empty-inset-shadow',
|
2020-06-06 19:31:29 +00:00
|
|
|
# this test fails for some of the backends
|
|
|
|
# 'empty-linear-gradient',
|
2019-05-20 01:32:30 +00:00
|
|
|
'empty-opacity',
|
|
|
|
'empty-outset-shadow',
|
|
|
|
'empty-repeat',
|
|
|
|
'empty-rounded-clip',
|
|
|
|
'empty-shadow',
|
|
|
|
'empty-texture',
|
|
|
|
'empty-transform',
|
2022-02-25 02:40:57 +00:00
|
|
|
'huge-height',
|
|
|
|
'huge-width',
|
2021-04-01 21:03:54 +00:00
|
|
|
'inset-shadow-multiple',
|
2020-12-24 05:32:17 +00:00
|
|
|
'invalid-transform',
|
2021-04-01 21:03:54 +00:00
|
|
|
'issue-3615',
|
|
|
|
'nested-rounded-clips',
|
2019-03-19 07:16:07 +00:00
|
|
|
'opacity_clip',
|
2021-09-15 05:37:57 +00:00
|
|
|
'opacity-overdraw',
|
2021-04-01 21:03:54 +00:00
|
|
|
'opacity-overlapping-children',
|
2019-03-19 07:16:07 +00:00
|
|
|
'outset_shadow_offset_both',
|
|
|
|
'outset_shadow_offset_x',
|
|
|
|
'outset_shadow_offset_y',
|
|
|
|
'outset_shadow_rounded_top',
|
|
|
|
'outset_shadow_simple',
|
2019-05-28 03:51:20 +00:00
|
|
|
'scaled-cairo',
|
2021-07-16 11:11:20 +00:00
|
|
|
'scale-textures-negative-ngl',
|
2021-04-01 21:03:54 +00:00
|
|
|
'scale-up-down',
|
2019-04-24 11:25:32 +00:00
|
|
|
'shadow-in-opacity',
|
2019-05-09 01:56:25 +00:00
|
|
|
'texture-url',
|
2019-08-10 12:47:02 +00:00
|
|
|
'repeat',
|
2019-11-19 09:45:35 +00:00
|
|
|
'repeat-no-repeat',
|
2019-11-26 07:41:23 +00:00
|
|
|
'repeat-negative-coords',
|
2021-04-01 21:03:54 +00:00
|
|
|
'repeat-texture',
|
2020-01-21 09:01:18 +00:00
|
|
|
'transform-in-transform',
|
|
|
|
'transform-in-transform-in-transform',
|
2021-02-10 01:28:42 +00:00
|
|
|
'rounded-clip-in-clip-3d', # not really 3d, but cairo fails it
|
2019-07-28 13:35:37 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
# these are too sensitive to differences in the renderers
|
|
|
|
# to run in ci, but still useful to keep around
|
|
|
|
informative_render_tests = [
|
|
|
|
'big-glyph',
|
|
|
|
'empty-text',
|
|
|
|
'huge-glyph',
|
2019-03-19 07:16:07 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
renderers = [
|
2022-12-14 17:31:50 +00:00
|
|
|
{ 'name': 'gl' },
|
|
|
|
{ 'name': 'broadway', 'exclude_term': '-3d' },
|
|
|
|
{ 'name': 'cairo', 'exclude_term': '-3d' },
|
|
|
|
]
|
|
|
|
|
|
|
|
compare_xfails = [
|
|
|
|
# Both tests fail because of some font rendering issue
|
|
|
|
'unaligned-offscreen',
|
|
|
|
'upside-down-label-3d', # not really 3d, but cairo fails it
|
2019-03-19 07:16:07 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach renderer : renderers
|
2022-12-14 17:31:50 +00:00
|
|
|
foreach testname : compare_render_tests
|
|
|
|
|
|
|
|
renderer_name = renderer.get('name')
|
|
|
|
exclude_term = renderer.get('exclude_term', '')
|
|
|
|
|
|
|
|
suites = [
|
|
|
|
'gsk',
|
|
|
|
'gsk-compare',
|
|
|
|
'gsk-' + renderer_name,
|
|
|
|
'gsk-compare-' + renderer_name,
|
|
|
|
]
|
|
|
|
|
|
|
|
if compare_xfails.contains(testname)
|
|
|
|
suites += 'failing'
|
|
|
|
endif
|
|
|
|
|
|
|
|
if ((exclude_term == '' or not testname.contains(exclude_term)) and
|
|
|
|
(renderer_name != 'broadway' or broadway_enabled))
|
|
|
|
test(renderer_name + ' ' + testname, compare_render,
|
2020-12-15 12:31:38 +00:00
|
|
|
args: [
|
2022-12-14 17:31:50 +00:00
|
|
|
'--output', join_paths(meson.current_build_dir(), 'compare', renderer_name),
|
|
|
|
join_paths(meson.current_source_dir(), 'compare', testname + '.node'),
|
|
|
|
join_paths(meson.current_source_dir(), 'compare', testname + '.png'),
|
2020-12-15 12:31:38 +00:00
|
|
|
],
|
|
|
|
env: [
|
2022-12-14 17:31:50 +00:00
|
|
|
'GSK_RENDERER=' + renderer_name,
|
2020-12-15 12:31:38 +00:00
|
|
|
'GTK_A11Y=test',
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
|
|
|
|
],
|
2022-12-14 17:31:50 +00:00
|
|
|
suite: suites,
|
2020-12-15 12:31:38 +00:00
|
|
|
)
|
2019-03-21 05:47:36 +00:00
|
|
|
endif
|
2019-03-19 07:16:07 +00:00
|
|
|
endforeach
|
|
|
|
endforeach
|
|
|
|
|
2019-03-19 04:29:20 +00:00
|
|
|
node_parser_tests = [
|
2019-05-20 01:38:45 +00:00
|
|
|
'blend.node',
|
|
|
|
'border.node',
|
|
|
|
'color.node',
|
2022-07-15 13:42:45 +00:00
|
|
|
'conic-gradient.node',
|
|
|
|
'conic-gradient.ref.node',
|
2019-05-14 01:20:09 +00:00
|
|
|
'crash1.errors',
|
|
|
|
'crash1.node',
|
|
|
|
'crash1.ref.node',
|
|
|
|
'crash2.errors',
|
|
|
|
'crash2.node',
|
|
|
|
'crash2.ref.node',
|
|
|
|
'crash3.node',
|
|
|
|
'crash3.ref.node',
|
|
|
|
'crash4.errors',
|
|
|
|
'crash4.node',
|
|
|
|
'crash4.ref.node',
|
2019-05-20 01:38:45 +00:00
|
|
|
'debug.node',
|
2022-07-15 13:42:45 +00:00
|
|
|
'debug-fail.node',
|
|
|
|
'debug-fail.ref.node',
|
|
|
|
'debug-fail.errors',
|
2019-05-19 19:34:13 +00:00
|
|
|
'empty-blend.node',
|
|
|
|
'empty-blend.ref.node',
|
|
|
|
'empty-blur.node',
|
|
|
|
'empty-blur.ref.node',
|
|
|
|
'empty-border.node',
|
|
|
|
'empty-border.ref.node',
|
2019-05-25 22:50:13 +00:00
|
|
|
'empty-cairo.node',
|
|
|
|
'empty-cairo.ref.node',
|
2019-05-19 19:34:13 +00:00
|
|
|
'empty-clip.node',
|
|
|
|
'empty-clip.ref.node',
|
|
|
|
'empty-color.node',
|
|
|
|
'empty-color.ref.node',
|
|
|
|
'empty-color-matrix.node',
|
|
|
|
'empty-color-matrix.ref.node',
|
|
|
|
'empty-container.node',
|
|
|
|
'empty-container.ref.node',
|
|
|
|
'empty-cross-fade.node',
|
|
|
|
'empty-cross-fade.ref.node',
|
|
|
|
'empty-debug.node',
|
|
|
|
'empty-debug.ref.node',
|
|
|
|
'empty-inset-shadow.node',
|
|
|
|
'empty-inset-shadow.ref.node',
|
|
|
|
'empty-linear-gradient.node',
|
|
|
|
'empty-linear-gradient.ref.node',
|
|
|
|
'empty-opacity.node',
|
|
|
|
'empty-opacity.ref.node',
|
|
|
|
'empty-outset-shadow.node',
|
|
|
|
'empty-outset-shadow.ref.node',
|
|
|
|
'empty-repeat.node',
|
|
|
|
'empty-repeat.ref.node',
|
|
|
|
'empty-rounded-clip.node',
|
|
|
|
'empty-rounded-clip.ref.node',
|
|
|
|
'empty-shadow.node',
|
|
|
|
'empty-shadow.ref.node',
|
|
|
|
'empty-text.node',
|
|
|
|
'empty-text.ref.node',
|
|
|
|
'empty-texture.node',
|
|
|
|
'empty-texture.ref.node',
|
|
|
|
'empty-transform.node',
|
|
|
|
'empty-transform.ref.node',
|
2022-07-15 13:42:45 +00:00
|
|
|
'glshader.node',
|
|
|
|
'glshader.ref.node',
|
|
|
|
'glshader.errors',
|
|
|
|
'gradient-fail.node',
|
|
|
|
'gradient-fail.ref.node',
|
|
|
|
'gradient-fail.errors',
|
|
|
|
'radial-gradient.node',
|
|
|
|
'radial-gradient.ref.node',
|
|
|
|
'repeating-linear-gradient.node',
|
|
|
|
'repeating-linear-gradient.ref.node',
|
|
|
|
'repeating-radial-gradient.node',
|
|
|
|
'repeating-radial-gradient.ref.node',
|
2019-05-20 01:38:45 +00:00
|
|
|
'rounded-rect.node',
|
|
|
|
'shadow.node',
|
2022-07-15 13:42:45 +00:00
|
|
|
'shadow-fail.node',
|
|
|
|
'shadow-fail.ref.node',
|
|
|
|
'shadow-fail.errors',
|
2019-05-20 01:38:45 +00:00
|
|
|
'testswitch.node',
|
2022-07-15 13:42:45 +00:00
|
|
|
'text-fail.node',
|
|
|
|
'text-fail.ref.node',
|
|
|
|
'text-fail.errors',
|
|
|
|
'texture-fail.node',
|
|
|
|
'texture-fail.ref.node',
|
|
|
|
'texture-fail.ref.errors',
|
|
|
|
'transform-fail.node',
|
|
|
|
'transform-fail.ref.node',
|
|
|
|
'transform-fail.errors',
|
2019-05-20 01:38:45 +00:00
|
|
|
'widgetfactory.node',
|
2019-03-19 04:29:20 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach test : node_parser_tests
|
2019-05-14 01:20:09 +00:00
|
|
|
if test.endswith('.node') and not test.endswith('.ref.node')
|
|
|
|
test('parser ' + test, node_parser,
|
2020-12-15 12:31:38 +00:00
|
|
|
args: [
|
|
|
|
join_paths(meson.current_source_dir(), 'nodeparser', test)
|
|
|
|
],
|
|
|
|
env: [
|
|
|
|
'GSK_RENDERER=opengl',
|
|
|
|
'GTK_A11Y=test',
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
|
|
|
|
],
|
|
|
|
suite: 'gsk',
|
|
|
|
)
|
2019-05-14 01:20:09 +00:00
|
|
|
endif
|
2019-03-19 04:29:20 +00:00
|
|
|
endforeach
|
2019-06-03 16:10:09 +00:00
|
|
|
|
|
|
|
tests = [
|
|
|
|
['transform'],
|
2020-09-23 22:05:57 +00:00
|
|
|
['shader'],
|
2019-06-03 16:10:09 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
test_cargs = []
|
|
|
|
|
|
|
|
foreach t : tests
|
|
|
|
test_name = t.get(0)
|
|
|
|
test_srcs = ['@0@.c'.format(test_name)] + t.get(1, [])
|
|
|
|
test_extra_cargs = t.get(2, [])
|
|
|
|
test_extra_ldflags = t.get(3, [])
|
|
|
|
|
|
|
|
test_exe = executable(test_name, test_srcs,
|
2020-03-06 17:11:46 +00:00
|
|
|
c_args : test_cargs + test_extra_cargs + common_cflags,
|
2019-06-03 16:10:09 +00:00
|
|
|
link_args : test_extra_ldflags,
|
|
|
|
dependencies : libgtk_dep,
|
|
|
|
install: get_option('install-tests'),
|
2020-12-15 12:31:38 +00:00
|
|
|
install_dir: testexecdir,
|
|
|
|
)
|
2019-06-03 16:10:09 +00:00
|
|
|
|
|
|
|
test(test_name, test_exe,
|
2020-12-15 12:31:38 +00:00
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
|
|
|
env: [
|
|
|
|
'GSK_RENDERER=cairo',
|
|
|
|
'GTK_A11Y=test',
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
|
|
|
|
],
|
|
|
|
suite: 'gsk',
|
|
|
|
)
|
2019-06-03 16:10:09 +00:00
|
|
|
endforeach
|
2021-03-28 14:21:18 +00:00
|
|
|
|
|
|
|
internal_tests = [
|
2021-07-13 13:02:16 +00:00
|
|
|
[ 'diff' ],
|
|
|
|
[ 'half-float' ],
|
2022-07-15 13:42:45 +00:00
|
|
|
['rounded-rect'],
|
|
|
|
['misc'],
|
2021-03-28 14:21:18 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach t : internal_tests
|
|
|
|
test_name = t.get(0)
|
|
|
|
test_srcs = ['@0@.c'.format(test_name)] + t.get(1, [])
|
|
|
|
test_extra_cargs = t.get(2, [])
|
|
|
|
test_extra_ldflags = t.get(3, [])
|
|
|
|
|
|
|
|
test_exe = executable(test_name, test_srcs,
|
|
|
|
c_args : test_cargs + test_extra_cargs + common_cflags,
|
|
|
|
link_args : test_extra_ldflags,
|
|
|
|
dependencies : libgtk_static_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir,
|
|
|
|
)
|
|
|
|
|
|
|
|
test(test_name, test_exe,
|
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
|
|
|
env: [
|
|
|
|
'GSK_RENDERER=cairo',
|
|
|
|
'GTK_A11Y=test',
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
|
|
|
|
],
|
|
|
|
suite: 'gsk',
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|