2017-05-02 18:04:58 +02:00
|
|
|
gobject_tests = [
|
|
|
|
['gvalue-test'],
|
|
|
|
['paramspec-test'],
|
|
|
|
['deftype'],
|
|
|
|
['defaultiface', ['defaultiface.c', 'testmodule.c']],
|
|
|
|
['dynamictype', ['dynamictype.c', 'testmodule.c']],
|
|
|
|
['override'],
|
|
|
|
['signals'],
|
|
|
|
['singleton'],
|
|
|
|
['references'],
|
2013-06-13 11:30:37 +02:00
|
|
|
['testgobject'],
|
2017-05-02 18:04:58 +02:00
|
|
|
]
|
|
|
|
|
2017-07-17 14:59:20 +02:00
|
|
|
# We cannot use gnome.genmarshal() here
|
|
|
|
testmarshal_h = custom_target('testmarshal_h',
|
|
|
|
output : 'testmarshal.h',
|
|
|
|
input : 'testmarshal.list',
|
|
|
|
command : [
|
|
|
|
python, glib_genmarshal,
|
|
|
|
'--prefix=test_marshal',
|
|
|
|
'--output=@OUTPUT@',
|
|
|
|
'--quiet',
|
|
|
|
'--header',
|
|
|
|
'@INPUT@',
|
|
|
|
],
|
|
|
|
)
|
2017-05-02 18:04:58 +02:00
|
|
|
|
2017-07-17 14:59:20 +02:00
|
|
|
testmarshal_c = custom_target('testmarshal_c',
|
|
|
|
output : 'testmarshal.c',
|
|
|
|
input : 'testmarshal.list',
|
|
|
|
command : [
|
|
|
|
python, glib_genmarshal,
|
|
|
|
'--prefix=test_marshal',
|
|
|
|
'--include-header=testmarshal.h',
|
|
|
|
'--output=@OUTPUT@',
|
|
|
|
'--quiet',
|
|
|
|
'--body',
|
|
|
|
'@INPUT@',
|
|
|
|
],
|
|
|
|
)
|
2017-05-02 18:04:58 +02:00
|
|
|
|
2017-07-17 14:59:20 +02:00
|
|
|
gobject_tests += [
|
|
|
|
['accumulator', ['accumulator.c', testmarshal_c, testmarshal_h]],
|
|
|
|
]
|
2017-05-02 18:04:58 +02:00
|
|
|
|
|
|
|
foreach t : gobject_tests
|
|
|
|
test_name = t.get(0)
|
|
|
|
test_src = t.get(1, test_name + '.c')
|
|
|
|
test_extra_cargs = t.get(2, [])
|
|
|
|
test_timeout = t.get(3, 30)
|
2018-06-10 16:33:06 +02:00
|
|
|
test_suite = test_timeout == 30 ? ['gobject'] : ['gobject', 'slow']
|
2017-05-02 18:04:58 +02:00
|
|
|
|
|
|
|
# FIXME? $(GLIB_DEBUG_FLAGS)
|
2017-07-17 11:54:28 +02:00
|
|
|
exe = executable(test_name + '-gobject', test_src,
|
2017-05-02 18:04:58 +02:00
|
|
|
c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
|
|
|
|
dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
|
|
|
|
install : false,
|
|
|
|
)
|
|
|
|
# FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
|
2018-06-10 16:33:06 +02:00
|
|
|
test(test_name, exe, env : test_env, timeout : test_timeout, suite : test_suite)
|
2017-05-02 18:04:58 +02:00
|
|
|
endforeach
|
|
|
|
|
|
|
|
# Don't install these ones, and keep them out of 'make check' because they take too long...
|
|
|
|
executable('performance', 'performance.c',
|
|
|
|
c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
|
|
|
|
dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
|
|
|
|
install : false)
|
|
|
|
|
|
|
|
executable('performance-threaded', 'performance-threaded.c',
|
|
|
|
c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
|
|
|
|
dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
|
|
|
|
install : false)
|
|
|
|
|
|
|
|
if host_system != 'windows' and host_system != 'minix'
|
|
|
|
executable('timeloop-closure', 'timeloop-closure.c',
|
|
|
|
c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
|
|
|
|
dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
|
|
|
|
install : false)
|
|
|
|
endif
|