2021-04-30 13:46:11 +00:00
|
|
|
testexecdir = join_paths(installed_test_bindir, 'gdk')
|
|
|
|
testdatadir = join_paths(installed_test_datadir, 'gdk')
|
|
|
|
|
2021-04-26 21:02:50 +00:00
|
|
|
clipboard_client = executable('clipboard-client',
|
|
|
|
sources: ['clipboard-client.c'],
|
|
|
|
include_directories: [confinc],
|
|
|
|
c_args: common_cflags,
|
|
|
|
dependencies: [ libgtk_dep ],
|
2021-04-30 13:46:11 +00:00
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir)
|
2017-10-18 01:19:44 +00:00
|
|
|
|
2017-03-22 11:39:27 +00:00
|
|
|
tests = [
|
2021-09-17 15:24:54 +00:00
|
|
|
{ 'name': 'array' },
|
|
|
|
{ 'name': 'cairo' },
|
|
|
|
{ 'name': 'clipboard', 'parallel': false, },
|
|
|
|
{ 'name': 'contentformats' },
|
|
|
|
{ 'name': 'contentserializer' },
|
|
|
|
{ 'name': 'cursor' },
|
|
|
|
{ 'name': 'display' },
|
|
|
|
{ 'name': 'displaymanager' },
|
|
|
|
{ 'name': 'encoding' },
|
|
|
|
{ 'name': 'keysyms' },
|
|
|
|
{ 'name': 'memorytexture' },
|
|
|
|
{ 'name': 'pixbuf' },
|
|
|
|
{ 'name': 'rectangle' },
|
|
|
|
{ 'name': 'rgba' },
|
|
|
|
{ 'name': 'seat' },
|
|
|
|
{ 'name': 'texture' },
|
|
|
|
{ 'name': 'texture-threads' },
|
2017-03-22 11:39:27 +00:00
|
|
|
]
|
2016-08-21 16:01:14 +00:00
|
|
|
|
2017-03-22 11:39:27 +00:00
|
|
|
foreach t : tests
|
2021-09-17 15:24:54 +00:00
|
|
|
test_name = t.get('name')
|
|
|
|
test_exe = executable(test_name,
|
|
|
|
sources: '@0@.c'.format(test_name),
|
2020-10-09 17:17:04 +00:00
|
|
|
c_args: common_cflags,
|
|
|
|
dependencies: libgtk_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir,
|
|
|
|
)
|
2017-10-18 01:19:44 +00:00
|
|
|
|
2021-09-17 15:24:54 +00:00
|
|
|
test(test_name, test_exe,
|
2020-10-09 17:17:04 +00:00
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
2021-09-17 15:24:54 +00:00
|
|
|
is_parallel: t.get('parallel', false),
|
2020-10-09 17:17:04 +00:00
|
|
|
env: [
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
|
2021-04-30 12:10:48 +00:00
|
|
|
'DBUS_SESSION_BUS_ADDRESS=',
|
2020-10-09 17:17:04 +00:00
|
|
|
],
|
|
|
|
suite: 'gdk',
|
|
|
|
)
|
2021-04-30 11:47:19 +00:00
|
|
|
endforeach
|
2016-08-21 16:01:14 +00:00
|
|
|
|
2021-09-12 00:27:13 +00:00
|
|
|
internal_tests = [
|
|
|
|
'image'
|
|
|
|
]
|
|
|
|
|
|
|
|
foreach t : internal_tests
|
|
|
|
test_exe = executable(t, '@0@.c'.format(t),
|
|
|
|
c_args: common_cflags,
|
|
|
|
dependencies: libgtk_static_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir,
|
|
|
|
)
|
|
|
|
|
|
|
|
test(t, test_exe,
|
|
|
|
args: [ '--tap', '-k' ],
|
|
|
|
protocol: 'tap',
|
|
|
|
env: [
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir()),
|
|
|
|
'DBUS_SESSION_BUS_ADDRESS=',
|
|
|
|
],
|
|
|
|
suite: 'gdk',
|
|
|
|
)
|
|
|
|
endforeach
|
|
|
|
|
|
|
|
|
2021-04-30 11:47:19 +00:00
|
|
|
if get_option('install-tests')
|
|
|
|
foreach t : tests
|
2021-09-17 15:24:54 +00:00
|
|
|
test_name = t.get('name')
|
2017-10-18 01:52:48 +00:00
|
|
|
test_cdata = configuration_data()
|
|
|
|
test_cdata.set('testexecdir', testexecdir)
|
2021-09-17 15:24:54 +00:00
|
|
|
test_cdata.set('test', test_name)
|
2017-10-18 01:52:48 +00:00
|
|
|
configure_file(input: 'gdk.test.in',
|
2020-10-09 17:17:04 +00:00
|
|
|
output: '@0@.test'.format(t),
|
|
|
|
configuration: test_cdata,
|
|
|
|
install: true,
|
|
|
|
install_dir: testdatadir,
|
|
|
|
)
|
2021-04-30 11:47:19 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
install_subdir('clipboard-data', install_dir: testexecdir)
|
2021-09-12 00:27:13 +00:00
|
|
|
install_subdir('image-data', install_dir: testexecdir)
|
2021-04-30 11:47:19 +00:00
|
|
|
endif
|