2016-03-07 12:13:24 +01:00
|
|
|
gobject_tests = [
|
|
|
|
'qdata',
|
|
|
|
'boxed',
|
|
|
|
'enums',
|
|
|
|
'param',
|
|
|
|
'threadtests',
|
|
|
|
'dynamictests',
|
|
|
|
'binding',
|
|
|
|
'properties',
|
|
|
|
'reference',
|
|
|
|
'value',
|
|
|
|
'type',
|
|
|
|
'private',
|
|
|
|
'closure',
|
|
|
|
'object',
|
|
|
|
'signal-handler',
|
|
|
|
'ifaceproperties',
|
|
|
|
]
|
|
|
|
|
2017-01-28 13:52:18 +01:00
|
|
|
# FIXME: use new environment() object
|
|
|
|
# FIXME: put common bits of test environment() in one location
|
|
|
|
# Not entirely random of course, but at least it changes over time
|
2017-07-14 14:56:02 +02:00
|
|
|
random_number = minor_version + meson.version().split('.').get(1).to_int()
|
2017-01-28 13:52:18 +01:00
|
|
|
|
2016-03-07 12:13:24 +01:00
|
|
|
test_env = [
|
|
|
|
'G_TEST_SRCDIR=' + meson.current_source_dir(),
|
|
|
|
'G_TEST_BUILDDIR=' + meson.current_build_dir(),
|
2017-01-28 13:52:18 +01:00
|
|
|
'G_DEBUG=gc-friendly',
|
|
|
|
'MALLOC_CHECK_=2',
|
|
|
|
'MALLOC_PERTURB_=@0@'.format(random_number % 256),
|
2016-03-07 12:13:24 +01:00
|
|
|
]
|
|
|
|
|
|
|
|
foreach test_name : gobject_tests
|
2016-12-20 23:37:24 +01:00
|
|
|
deps = [libm, thread_dep, libglib_dep, libgobject_dep]
|
2016-03-07 12:13:24 +01:00
|
|
|
test_src = '@0@.c'.format(test_name)
|
|
|
|
# private is an existing or reserved target it seems
|
|
|
|
if test_name == 'private'
|
|
|
|
test_name = 'gobject-private'
|
|
|
|
endif
|
|
|
|
exe = executable(test_name, test_src,
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : ['-DG_LOG_DOMAIN="GLib-GObject"'],
|
2016-03-07 12:13:24 +01:00
|
|
|
dependencies : deps,
|
|
|
|
)
|
|
|
|
test(test_name, exe, env : test_env)
|
|
|
|
endforeach
|
|
|
|
|
2017-07-17 11:54:28 +02:00
|
|
|
marshalers_h = custom_target('marshalers_h',
|
|
|
|
output : 'marshalers.h',
|
|
|
|
input : 'marshalers.list',
|
|
|
|
command : [
|
|
|
|
python, glib_genmarshal,
|
|
|
|
'--prefix=test',
|
|
|
|
'--valist-marshallers',
|
|
|
|
'--output=@OUTPUT@',
|
|
|
|
'--quiet',
|
|
|
|
'--header',
|
|
|
|
'@INPUT@',
|
|
|
|
],
|
|
|
|
)
|
|
|
|
marshalers_c = custom_target('marshalers_c',
|
|
|
|
output : 'marshalers.c',
|
|
|
|
input : 'marshalers.list',
|
|
|
|
command : [
|
|
|
|
python, glib_genmarshal,
|
|
|
|
'--prefix=test',
|
|
|
|
'--valist-marshallers',
|
|
|
|
'--include-header=marshalers.h',
|
|
|
|
'--output=@OUTPUT@',
|
|
|
|
'--quiet',
|
|
|
|
'--body',
|
|
|
|
'@INPUT@',
|
|
|
|
],
|
|
|
|
)
|
2016-03-07 12:13:24 +01:00
|
|
|
|
2017-07-17 11:54:28 +02:00
|
|
|
exe = executable('signals',
|
|
|
|
'signals.c', marshalers_h, marshalers_c,
|
2018-02-19 13:09:10 +01:00
|
|
|
c_args : ['-DG_LOG_DOMAIN="GLib-GObject"'],
|
2017-07-17 11:54:28 +02:00
|
|
|
dependencies : deps,
|
|
|
|
)
|
|
|
|
test('signals', exe, env : test_env)
|