2017-10-18 01:19:44 +00:00
|
|
|
testexecdir = join_paths(installed_test_bindir, 'gdk')
|
|
|
|
testdatadir = join_paths(installed_test_datadir, 'gdk')
|
|
|
|
|
2017-03-22 11:39:27 +00:00
|
|
|
tests = [
|
|
|
|
'cairo',
|
|
|
|
'display',
|
|
|
|
'encoding',
|
|
|
|
'keysyms',
|
2018-03-12 04:12:54 +00:00
|
|
|
'memorytexture',
|
2017-03-22 11:39:27 +00:00
|
|
|
'rectangle',
|
|
|
|
'rgba',
|
|
|
|
'seat',
|
|
|
|
]
|
2016-08-21 16:01:14 +00:00
|
|
|
|
2017-03-22 11:39:27 +00:00
|
|
|
foreach t : tests
|
2017-10-18 01:19:44 +00:00
|
|
|
test_exe = executable(t, '@0@.c'.format(t),
|
2020-03-06 17:13:59 +00:00
|
|
|
c_args: common_cflags,
|
2017-10-18 01:19:44 +00:00
|
|
|
dependencies: libgtk_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir)
|
|
|
|
|
|
|
|
test(t, test_exe,
|
|
|
|
args: [ '--tap', '-k' ],
|
2020-03-20 13:39:56 +00:00
|
|
|
protocol: 'tap',
|
2020-05-15 16:57:49 +00:00
|
|
|
env: [
|
2017-10-18 08:55:02 +00:00
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
|
|
|
|
],
|
2017-10-18 01:19:44 +00:00
|
|
|
suite: 'gdk')
|
2016-08-21 16:01:14 +00:00
|
|
|
|
2017-10-18 01:52:48 +00:00
|
|
|
if get_option('install-tests')
|
|
|
|
test_cdata = configuration_data()
|
|
|
|
test_cdata.set('testexecdir', testexecdir)
|
|
|
|
test_cdata.set('test', t)
|
|
|
|
configure_file(input: 'gdk.test.in',
|
2017-10-18 01:19:44 +00:00
|
|
|
output: '@0@.test'.format(t),
|
|
|
|
configuration: test_cdata,
|
|
|
|
install: true,
|
|
|
|
install_dir: testdatadir)
|
2017-10-18 01:52:48 +00:00
|
|
|
endif
|
|
|
|
endforeach
|