Merge branch 'source-get-id-docs' into 'master'
[glib.git] / tests / gobject / meson.build
blob4944599218e1693b0a0b345a19e8292f210539cb
1 gobject_tests = [
2   ['gvalue-test'],
3   ['paramspec-test'],
4   ['deftype'],
5   ['defaultiface', ['defaultiface.c', 'testmodule.c']],
6   ['dynamictype', ['dynamictype.c', 'testmodule.c']],
7   ['override'],
8   ['signals'],
9   ['singleton'],
10   ['references'],
11   ['testgobject'],
14 # We cannot use gnome.genmarshal() here
15 testmarshal_h = custom_target('testmarshal_h',
16   output : 'testmarshal.h',
17   input : 'testmarshal.list',
18   command : [
19     python, glib_genmarshal,
20     '--prefix=test_marshal',
21     '--output=@OUTPUT@',
22     '--quiet',
23     '--header',
24     '@INPUT@',
25   ],
28 testmarshal_c = custom_target('testmarshal_c',
29   output : 'testmarshal.c',
30   input : 'testmarshal.list',
31   command : [
32     python, glib_genmarshal,
33     '--prefix=test_marshal',
34     '--include-header=testmarshal.h',
35     '--output=@OUTPUT@',
36     '--quiet',
37     '--body',
38     '@INPUT@',
39   ],
42 gobject_tests += [
43   ['accumulator', ['accumulator.c', testmarshal_c, testmarshal_h]],
46 foreach t : gobject_tests
47   test_name = t.get(0)
48   test_src = t.get(1, test_name + '.c')
49   test_extra_cargs = t.get(2, [])
50   test_timeout = t.get(3, 30)
51   test_suite = test_timeout == 30 ? ['gobject'] : ['gobject', 'slow']
53   # FIXME? $(GLIB_DEBUG_FLAGS)
54   exe = executable(test_name + '-gobject', test_src,
55     c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
56     dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
57     install : false,
58   )
59   # FIXME? TESTS_ENVIRONMENT = LIBCHARSET_ALIAS_DIR=$(top_builddir)/glib/libcharset
60   test(test_name, exe, env : test_env, timeout : test_timeout, suite : test_suite)
61 endforeach
63 # Don't install these ones, and keep them out of 'make check' because they take too long...
64 executable('performance', 'performance.c',
65     c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
66     dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
67     install : false)
69 executable('performance-threaded', 'performance-threaded.c',
70     c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
71     dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
72     install : false)
74 if host_system != 'windows' and host_system != 'minix'
75   executable('timeloop-closure', 'timeloop-closure.c',
76       c_args : test_cargs + test_extra_cargs + ['-DGLIB_DISABLE_DEPRECATION_WARNINGS'],
77       dependencies : [libm, thread_dep, libglib_dep, libgobject_dep],
78       install : false)
79 endif