1 # Test programs buildable on all platforms
4 'async-close-output-stream',
5 'async-splice-output-stream',
6 'buffered-input-stream',
7 'buffered-output-stream',
15 #'defaultvalue', # FIXME: needs giotypefuncs.c generated
16 'fileattributematcher',
27 'memory-input-stream',
28 'memory-output-stream',
36 'simple-async-result',
51 'thumbnail-verification',
54 # Test programs buildable on UNIX only
56 if host_machine.system() != 'windows'
59 'gdbus-peer-object-manager',
60 'gdbus-unix-addresses',
69 if cc.get_id() == 'gcc' or cc.get_id() == 'clang'
70 gio_tests += [ 'autoptr' ]
74 'G_TEST_SRCDIR=' + meson.current_source_dir(),
75 'G_TEST_BUILDDIR=' + meson.current_build_dir(),
80 '-DG_LOG_DOMAIN="GLib-GIO"',
81 '-DTEST_SERVICES="@0@/gio/tests/services"'.format(meson.build_root()),
84 foreach test_name : gio_tests
85 src_file = '@0@.c'.format(test_name)
86 # conflicts with glib/tests/autoptr, can't have two targets with same name
87 if test_name == 'autoptr'
88 test_name = 'autoptr-gio'
90 exe = executable(test_name, src_file,
91 include_directories : inc_dirs,
94 link_with : [ libgio, libgmodule, libglib ],
97 if test_name == 'testfilemonitor'
98 test(test_name, exe, env : test_env, timeout : 45)
100 test(test_name, exe, env : test_env)
104 uninstalled_test_extra_programs = [
108 'gapplication-example-actions',
109 'gapplication-example-cmdline',
110 'gapplication-example-cmdline2',
111 'gapplication-example-cmdline3',
112 'gapplication-example-dbushooks',
113 'gapplication-example-open',
114 'gdbus-example-export',
115 'gdbus-example-own-name',
116 'gdbus-example-peer',
117 'gdbus-example-proxy-subclass',
118 'gdbus-example-server',
119 'gdbus-example-subtree',
120 'gdbus-example-watch-name',
121 'gdbus-example-watch-proxy',
122 'gsubprocess-testprog',
130 foreach extra_program : uninstalled_test_extra_programs
131 exe = executable(extra_program, '@0@.c'.format(extra_program),
132 include_directories : inc_dirs,
134 c_args : test_c_args,
135 link_with : [ libgio, libgmodule, libglib ],
140 test_extra_programs = [
141 'gdbus-connection-flush-helper',
145 exe = executable('tls-certificate', 'tls-certificate.c', 'gtesttlsbackend.c',
146 include_directories : inc_dirs,
147 c_args : test_c_args,
148 link_with : [ libgio, libgmodule, libglib ],
151 test('tls-certificate', exe, env : test_env)
153 exe = executable('socket-client', 'socket-client.c', 'gtlsconsoleinteraction.c',
154 include_directories : inc_dirs,
155 c_args : test_c_args,
156 link_with : [ libgio, libgmodule, libglib ],
160 #exe = executable('gdbus-daemon', 'gdbus-daemon.c', '../gdbusdaemon.c',
161 # #meson.build_root() + '/gio/gdbus-daemon-generated.c', # FIXME
162 # include_directories : inc_dirs,
163 # c_args : test_c_args,
164 # link_with : [ libgio, libgmodule, libglib ],
165 # dependencies : deps,
167 #test('gdbus-daemon', exe, env : test_env)
171 if cc.get_id() == 'gcc'
172 c_args_atomic += [ '-Wstrict-aliasing=2' ]
175 # FIXME: consolidate all of these into the array
176 exe = executable('overflow-fallback', 'overflow.c',
177 include_directories : inc_dirs,
178 c_args : [ '-DHAVE_CONFIG_H=1', '-D_GLIB_TEST_OVERFLOW_FALLBACK' ],
182 test('overflow-fallback', exe, env : test_env)
184 exe = executable('642026-ec', '642026.c',
185 include_directories : inc_dirs,
186 c_args : [ '-DHAVE_CONFIG_H=1', '-DG_ERRORCHECK_MUTEXES' ],
190 test('642026-ec', exe, env : test_env)
192 exe = executable('1bit-emufutex', '1bit-mutex.c',
193 include_directories : inc_dirs,
194 c_args : [ '-DHAVE_CONFIG_H=1', '-DTEST_EMULATED_FUTEX' ],
198 test('1bit-emufutex', exe, env : test_env)
200 if glib_conf.has('HAVE_EVENTFD')
201 exe = executable('gwakeup-fallback', 'gwakeuptest.c', '../gwakeup.c',
202 include_directories : inc_dirs,
203 c_args : [ '-DHAVE_CONFIG_H=1', '-DTEST_EVENTFD_FALLBACK' ],
207 test('gwakeup-fallback', exe, env : test_env)
210 # test-spawn-echo helper binary required by the spawn tests
211 executable('test-spawn-echo', 'test-spawn-echo.c',
212 include_directories : inc_dirs,
213 c_args : [ '-DHAVE_CONFIG_H=1', '-DG_LOG_DOMAIN="GLib"' ],