2017-10-18 02:18:51 +00:00
|
|
|
testexecdir = join_paths(installed_test_bindir, 'gtk')
|
|
|
|
testdatadir = join_paths(installed_test_datadir, 'gtk')
|
|
|
|
|
2017-08-01 08:57:11 +00:00
|
|
|
gtk_tests_export_dynamic_ldflag = []
|
|
|
|
|
|
|
|
if cc.get_id() != 'msvc'
|
|
|
|
gtk_tests_export_dynamic_ldflag = ['-Wl,--export-dynamic']
|
|
|
|
endif
|
|
|
|
|
2017-03-22 11:23:52 +00:00
|
|
|
tests = [
|
|
|
|
['accel'],
|
|
|
|
['accessible'],
|
|
|
|
['adjustment'],
|
|
|
|
['bitmask', ['../../gtk/gtkallocatedbitmask.c'], ['-DGTK_COMPILATION', '-UG_ENABLE_DEBUG']],
|
2017-08-01 08:57:11 +00:00
|
|
|
['builder', [], [], gtk_tests_export_dynamic_ldflag],
|
2017-03-22 11:23:52 +00:00
|
|
|
['builderparser'],
|
|
|
|
['cellarea'],
|
|
|
|
['check-icon-names'],
|
|
|
|
['clipboard'],
|
|
|
|
['cssprovider'],
|
|
|
|
['entry'],
|
|
|
|
['firefox-stylecontext'],
|
|
|
|
['floating'],
|
|
|
|
['focus'],
|
|
|
|
['gestures'],
|
|
|
|
['grid'],
|
|
|
|
['gtkmenu'],
|
|
|
|
['icontheme'],
|
|
|
|
['keyhash', ['../../gtk/gtkkeyhash.c', gtkresources, '../../gtk/gtkprivate.c'], gtk_cargs],
|
|
|
|
['listbox'],
|
|
|
|
['notify'],
|
|
|
|
['no-gtk-init'],
|
|
|
|
['object'],
|
|
|
|
['objects-finalize'],
|
|
|
|
['papersize'],
|
|
|
|
['rbtree', ['../../gtk/gtkrbtree.c'], ['-DGTK_COMPILATION', '-UG_ENABLE_DEBUG']],
|
|
|
|
['recentmanager'],
|
|
|
|
['regression-tests'],
|
|
|
|
['scrolledwindow'],
|
|
|
|
['spinbutton'],
|
|
|
|
['stylecontext'],
|
|
|
|
['templates'],
|
|
|
|
['textbuffer'],
|
|
|
|
['textiter'],
|
|
|
|
['treemodel', ['treemodel.c', 'liststore.c', 'treestore.c', 'filtermodel.c',
|
|
|
|
'modelrefcount.c', 'sortmodel.c', 'gtktreemodelrefcount.c']],
|
|
|
|
['treepath'],
|
|
|
|
['treeview'],
|
|
|
|
['typename'],
|
|
|
|
['window'],
|
|
|
|
['displayclose'],
|
|
|
|
['revealer-size'],
|
2017-09-29 10:10:42 +00:00
|
|
|
['widgetorder'],
|
2017-03-22 11:23:52 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
test_cargs = []
|
|
|
|
|
|
|
|
if os_unix
|
|
|
|
# tests += [['defaultvalue']] # disabled in Makefile.am as well
|
|
|
|
test_cargs += ['-DHAVE_UNIX_PRINT_WIDGETS']
|
|
|
|
endif
|
|
|
|
|
|
|
|
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,
|
|
|
|
c_args : test_cargs + test_extra_cargs,
|
|
|
|
link_args : test_extra_ldflags,
|
2017-10-18 02:18:51 +00:00
|
|
|
dependencies : libgtk_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir)
|
2017-03-22 11:23:52 +00:00
|
|
|
|
2017-10-18 02:18:51 +00:00
|
|
|
test(test_name, test_exe,
|
|
|
|
args: [ '--tap', '-k' ],
|
2017-10-18 08:55:02 +00:00
|
|
|
env: [ 'GIO_USE_VOLUME_MONITOR=unix',
|
|
|
|
'GSETTINGS_BACKEND=memory',
|
|
|
|
'GTK_CSD=1',
|
|
|
|
'G_ENABLE_DIAGNOSTIC=0',
|
2017-10-18 14:45:52 +00:00
|
|
|
'GSK_RENDERER=cairo',
|
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 02:18:51 +00:00
|
|
|
suite: 'gtk')
|
2017-03-22 11:23:52 +00:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
# FIXME: if objc autotestkeywords_CPPFLAGS += -DHAVE_OBJC=1 -x objective-c++
|
|
|
|
if add_languages('cpp')
|
|
|
|
test_exe = executable('autotestkeywords',
|
2017-10-18 02:18:51 +00:00
|
|
|
'autotestkeywords.cc',
|
|
|
|
c_args : test_cargs + ['-Idummy-headers'],
|
|
|
|
dependencies : libgtk_dep,
|
|
|
|
install: get_option('install-tests'),
|
|
|
|
install_dir: testexecdir)
|
|
|
|
test('c++ keywords', test_exe,
|
|
|
|
args: [ '--tap', '-k' ],
|
2017-10-18 08:55:02 +00:00
|
|
|
env: [ 'GIO_USE_VOLUME_MONITOR=unix',
|
|
|
|
'GSETTINGS_BACKEND=memory',
|
|
|
|
'GTK_CSD=1',
|
|
|
|
'G_ENABLE_DIAGNOSTIC=0',
|
|
|
|
'G_TEST_SRCDIR=@0@'.format(meson.current_source_dir()),
|
|
|
|
'G_TEST_BUILDDIR=@0@'.format(meson.current_build_dir())
|
|
|
|
],
|
2017-10-18 02:18:51 +00:00
|
|
|
suite: 'gtk')
|
|
|
|
if get_option('install-tests')
|
|
|
|
conf = configuration_data()
|
|
|
|
conf.set('testexecdir', testexecdir)
|
|
|
|
conf.set('test', 'keywords')
|
|
|
|
configure_file(input: 'gtk.test.in',
|
|
|
|
output: 'keywords.test',
|
|
|
|
configuration: conf,
|
|
|
|
install_dir: testdatadir)
|
|
|
|
endif
|
2017-03-22 11:23:52 +00:00
|
|
|
endif
|
|
|
|
|
|
|
|
# FIXME: schemas from gtk+ dir?
|
|
|
|
# $(top_srcdir)/gtk/org.gtk.Settings.ColorChooser.gschema.xml
|
|
|
|
# $(top_srcdir)/gtk/org.gtk.Settings.FileChooser.gschema.xml
|
|
|
|
# gnome.compile_schemas()
|
|
|
|
|
2017-10-18 02:18:51 +00:00
|
|
|
if get_option('install-tests')
|
|
|
|
foreach t : tests
|
|
|
|
test_name = t.get(0)
|
|
|
|
conf = configuration_data()
|
|
|
|
conf.set('testexecdir', testexecdir)
|
|
|
|
conf.set('test', test_name)
|
|
|
|
configure_file(input: 'gtk.test.in',
|
|
|
|
output: '@0@.test'.format(test_name),
|
|
|
|
configuration: conf,
|
|
|
|
install_dir: testdatadir)
|
|
|
|
endforeach
|
2017-03-22 11:23:52 +00:00
|
|
|
|
2017-10-18 02:18:51 +00:00
|
|
|
install_subdir('icons', install_dir: testexecdir)
|
|
|
|
install_subdir('ui', install_dir: testexecdir)
|
2017-03-22 11:23:52 +00:00
|
|
|
|
2017-10-18 02:18:51 +00:00
|
|
|
endif
|
2017-03-22 11:23:52 +00:00
|
|
|
|