81db7101b1a4b9cddc8a047ba2c4641836047075
[platform/upstream/glib.git] / gio / tests / Makefile.am
1 NULL =
2 BUILT_SOURCES =
3
4 include $(top_srcdir)/Makefile.decl
5
6 SUBDIRS = gdbus-object-manager-example
7
8 INCLUDES =                      \
9         -g                      \
10         $(gio_INCLUDES)         \
11         $(GLIB_DEBUG_FLAGS)     \
12         -I$(top_builddir)/gio   \
13         -I$(top_srcdir)/gio     \
14         $(DBUS1_CFLAGS)         \
15         -DSRCDIR=\""$(srcdir)"\"
16
17 noinst_PROGRAMS = $(TEST_PROGS) $(SAMPLE_PROGS)
18 noinst_DATA = $(MISC_STUFF)
19
20 progs_ldadd     =                                       \
21         $(top_builddir)/glib/libglib-2.0.la             \
22         $(top_builddir)/gthread/libgthread-2.0.la       \
23         $(top_builddir)/gobject/libgobject-2.0.la       \
24         $(top_builddir)/gio/libgio-2.0.la
25
26 TEST_PROGS +=                   \
27         io-stream               \
28         actions                 \
29         memory-input-stream     \
30         memory-output-stream    \
31         readwrite               \
32         g-file                  \
33         g-file-info             \
34         converter-stream        \
35         data-input-stream       \
36         data-output-stream      \
37         g-icon                  \
38         buffered-input-stream   \
39         buffered-output-stream  \
40         sleepy-stream           \
41         filter-streams          \
42         volumemonitor           \
43         simple-async-result     \
44         srvtarget               \
45         contexts                \
46         gsettings               \
47         gschema-compile         \
48         async-close-output-stream \
49         gdbus-addresses         \
50         network-address         \
51         gdbus-message           \
52         socket                  \
53         pollable                \
54         tls-certificate         \
55         $(NULL)
56
57 if OS_UNIX
58 TEST_PROGS +=                   \
59         gdbus-connection        \
60         gdbus-connection-slow   \
61         gdbus-names             \
62         gdbus-proxy             \
63         gdbus-proxy-threads     \
64         gdbus-proxy-well-known-name \
65         gdbus-introspection     \
66         gdbus-threading         \
67         gdbus-export            \
68         gdbus-error             \
69         gdbus-peer              \
70         gdbus-exit-on-close     \
71         gdbus-non-socket        \
72         gdbus-bz627724          \
73         appinfo                 \
74         contenttype             \
75         file                    \
76         $(NULL)
77 endif
78
79 SAMPLE_PROGS =                          \
80         resolver                        \
81         socket-server                   \
82         socket-client                   \
83         echo-server                     \
84         httpd                           \
85         send-data                       \
86         filter-cat                      \
87         gdbus-example-export            \
88         gdbus-example-own-name          \
89         gdbus-example-watch-name        \
90         gdbus-example-watch-proxy       \
91         gdbus-example-server            \
92         gdbus-example-subtree           \
93         gdbus-example-peer              \
94         gdbus-example-proxy-subclass    \
95         gdbus-connection-flush-helper   \
96         appinfo-test                    \
97         proxy                           \
98         gapplication-example-open       \
99         gapplication-example-cmdline    \
100         gapplication-example-cmdline2   \
101         gapplication-example-cmdline3   \
102         gapplication-example-actions    \
103         $(NULL)
104
105
106 if OS_UNIX
107 TEST_PROGS +=                   \
108         live-g-file             \
109         desktop-app-info        \
110         unix-fd                 \
111         unix-streams            \
112         gapplication            \
113         gdbus-test-codegen      \
114         $(NULL)
115 SAMPLE_PROGS +=                                 \
116         gdbus-example-unix-fd-client            \
117         gdbus-example-objectmanager-server      \
118         gdbus-example-objectmanager-client      \
119         $(NULL)
120 endif
121
122 if OS_WIN32
123 TEST_PROGS += win32-streams
124 endif
125
126 io_stream_SOURCES = io-stream.c
127 io_stream_LDADD   = $(progs_ldadd)
128
129 actions_LDADD     = $(progs_ldadd)
130
131 memory_input_stream_SOURCES       = memory-input-stream.c
132 memory_input_stream_LDADD         = $(progs_ldadd)
133
134 memory_output_stream_SOURCES      = memory-output-stream.c
135 memory_output_stream_LDADD        = $(progs_ldadd)
136
137 g_file_SOURCES    = g-file.c
138 g_file_LDADD      = $(progs_ldadd)
139
140 readwrite_SOURCES         = readwrite.c
141 readwrite_LDADD   = $(progs_ldadd)
142
143 g_file_info_SOURCES     = g-file-info.c
144 g_file_info_LDADD       = $(progs_ldadd)
145
146 converter_stream_SOURCES        = converter-stream.c
147 converter_stream_LDADD          = $(progs_ldadd)
148
149 data_input_stream_SOURCES       = data-input-stream.c
150 data_input_stream_LDADD         = $(progs_ldadd)
151
152 data_output_stream_SOURCES      = data-output-stream.c
153 data_output_stream_LDADD        = $(progs_ldadd)
154
155 async_close_output_stream_SOURCES       = async-close-output-stream.c
156 async_close_output_stream_LDADD         = $(progs_ldadd)
157
158 filter_cat_SOURCES      = filter-cat.c
159 filter_cat_LDADD        = $(progs_ldadd)
160
161 g_icon_SOURCES  = g-icon.c
162 g_icon_LDADD    = $(progs_ldadd)
163
164 buffered_input_stream_SOURCES   = buffered-input-stream.c
165 buffered_input_stream_LDADD     = $(progs_ldadd)
166
167 buffered_output_stream_SOURCES  = buffered-output-stream.c
168 buffered_output_stream_LDADD    = $(progs_ldadd)
169
170 live_g_file_SOURCES       = live-g-file.c
171 live_g_file_LDADD         = $(progs_ldadd)
172
173 desktop_app_info_SOURCES  = desktop-app-info.c
174 desktop_app_info_LDADD    = $(progs_ldadd)
175
176 unix_streams_SOURCES      = unix-streams.c
177 unix_streams_LDADD        = $(progs_ldadd) \
178         $(top_builddir)/gthread/libgthread-2.0.la
179
180 win32_streams_SOURCES     = win32-streams.c
181 win32_streams_LDADD       = $(progs_ldadd) \
182         $(top_builddir)/gthread/libgthread-2.0.la
183
184 unix_fd_SOURCES   = unix-fd.c
185 unix_fd_LDADD     = $(progs_ldadd)
186
187 simple_async_result_SOURCES     = simple-async-result.c
188 simple_async_result_LDADD       = $(progs_ldadd)
189
190 sleepy_stream_SOURCES           = sleepy-stream.c
191 sleepy_stream_LDADD             = $(progs_ldadd)
192
193 filter_streams_SOURCES          = filter-streams.c
194 filter_streams_LDADD            = $(progs_ldadd)
195
196 volumemonitor_SOURCES           = volumemonitor.c
197 volumemonitor_LDADD             = $(progs_ldadd)
198
199 resolver_SOURCES          = resolver.c
200 resolver_LDADD            = $(progs_ldadd) \
201         $(top_builddir)/gthread/libgthread-2.0.la
202
203 socket_server_SOURCES     = socket-server.c
204 socket_server_LDADD       = $(progs_ldadd) \
205         $(top_builddir)/gthread/libgthread-2.0.la
206
207 socket_client_SOURCES     = socket-client.c \
208                             gtlsconsoleinteraction.c \
209                             gtlsconsoleinteraction.h
210 socket_client_LDADD       = $(progs_ldadd) \
211         $(top_builddir)/gthread/libgthread-2.0.la
212
213 echo_server_SOURCES       = echo-server.c
214 echo_server_LDADD         = $(progs_ldadd) \
215         $(top_builddir)/gthread/libgthread-2.0.la
216
217 httpd_SOURCES             = httpd.c
218 httpd_LDADD               = $(progs_ldadd) \
219         $(top_builddir)/gthread/libgthread-2.0.la
220
221 send_data_SOURCES         = send-data.c
222 send_data_LDADD           = $(progs_ldadd) \
223         $(top_builddir)/gthread/libgthread-2.0.la
224
225 srvtarget_SOURCES         = srvtarget.c
226 srvtarget_LDADD           = $(progs_ldadd)
227
228 network_address_SOURCE    = network-address.c
229 network_address_LDADD     = $(progs_ldadd)
230
231 socket_SOURCE             = socket.c
232 socket_LDADD              = $(progs_ldadd)
233
234 pollable_SOURCE           = pollable.c
235 pollable_LDADD            = $(progs_ldadd)
236
237 contexts_SOURCES          = contexts.c
238 contexts_LDADD            = $(progs_ldadd) \
239         $(top_builddir)/gthread/libgthread-2.0.la
240
241 gsettings_SOURCES         = gsettings.c
242 gsettings_LDADD           = $(progs_ldadd)
243
244 gschema_compile_SOURCES   = gschema-compile.c
245 gschema_compile_LDADD     = $(progs_ldadd)
246
247 if HAVE_DBUS1
248 TEST_PROGS += gdbus-serialization
249 gdbus_serialization_SOURCES = gdbus-serialization.c gdbus-tests.h gdbus-tests.c
250 gdbus_serialization_CFLAGS = $(DBUS1_CFLAGS)
251 gdbus_serialization_LDADD = $(progs_ldadd) $(DBUS1_LIBS)
252 endif
253
254 gdbus_addresses_SOURCES = gdbus-addresses.c
255 gdbus_addresses_LDADD = $(progs_ldadd)
256
257 gdbus_bz627724_SOURCES = gdbus-bz627724.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
258 gdbus_bz627724_LDADD = $(progs_ldadd)
259
260 if OS_UNIX
261 gdbus-test-codegen-generated.h gdbus-test-codegen-generated.c : test-codegen.xml
262         $(AM_V_GEN) PYTHONPATH=$(top_srcdir)/gio/gdbus-codegen:$(top_builddir)/gio/gdbus-codegen:$$PYTHONPATH $(PYTHON) $(top_srcdir)/gio/gdbus-codegen/codegen_main.py         \
263                 --interface-prefix org.project.                                                         \
264                 --generate-c-code gdbus-test-codegen-generated                                          \
265                 --c-generate-object-manager                                                             \
266                 --c-namespace Foo                                                                       \
267                 --generate-docbook gdbus-test-codegen-generated-doc                                     \
268                 --annotate "org.project.Bar" Key1 Value1                                                \
269                 --annotate "org.project.Bar" org.gtk.GDBus.Internal Value2                              \
270                 --annotate "org.project.Bar.HelloWorld()" Key3 Value3                                   \
271                 --annotate "org.project.Bar::TestSignal" Key4 Value4                                    \
272                 --annotate "org.project.Bar:ay" Key5 Value5                                             \
273                 --annotate "org.project.Bar.TestPrimitiveTypes()[val_int32]" Key6 Value6                \
274                 --annotate "org.project.Bar.TestPrimitiveTypes()[ret_uint32]" Key7 Value7               \
275                 --annotate "org.project.Bar::TestSignal[array_of_strings]" Key8 Value8                  \
276                 $(srcdir)/test-codegen.xml                                                                      \
277                 $(NULL)
278
279 BUILT_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
280
281 gdbus_test_codegen_SOURCES  = gdbus-test-codegen.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
282 gdbus_test_codegen_SOURCES += gdbus-test-codegen-generated.c gdbus-test-codegen-generated.h
283 gdbus_test_codegen_LDADD = $(progs_ldadd)
284 endif # OS_UNIX
285
286 gdbus_connection_SOURCES = gdbus-connection.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
287 gdbus_connection_LDADD = $(progs_ldadd)
288
289 gdbus_connection_slow_SOURCES = gdbus-connection-slow.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
290 gdbus_connection_slow_LDADD = $(progs_ldadd)
291
292 gdbus_message_SOURCES = gdbus-message.c
293 gdbus_message_LDADD = $(progs_ldadd)
294
295 gdbus_names_SOURCES = gdbus-names.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
296 gdbus_names_LDADD = $(progs_ldadd)
297
298 gdbus_proxy_SOURCES = gdbus-proxy.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
299 gdbus_proxy_LDADD = $(progs_ldadd)
300
301 gdbus_proxy_threads_SOURCES = gdbus-proxy-threads.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
302 gdbus_proxy_threads_LDADD = $(progs_ldadd)
303
304 gdbus_proxy_well_known_name_SOURCES = gdbus-proxy-well-known-name.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
305 gdbus_proxy_well_known_name_LDADD = $(progs_ldadd)
306
307 gdbus_introspection_SOURCES = gdbus-introspection.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
308 gdbus_introspection_LDADD = $(progs_ldadd)
309
310 gdbus_threading_SOURCES = gdbus-threading.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
311 gdbus_threading_LDADD = $(progs_ldadd)
312
313 gdbus_export_SOURCES = gdbus-export.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
314 gdbus_export_LDADD = $(progs_ldadd)
315
316 gdbus_error_SOURCES = gdbus-error.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
317 gdbus_error_LDADD = $(progs_ldadd)
318
319 gdbus_peer_SOURCES = gdbus-peer.c gdbus-tests.h gdbus-tests.c
320 gdbus_peer_LDADD = $(progs_ldadd)
321
322 gdbus_non_socket_SOURCES = gdbus-non-socket.c gdbus-tests.h gdbus-tests.c
323 gdbus_non_socket_LDADD = $(progs_ldadd)
324
325 gdbus_exit_on_close_SOURCES = gdbus-exit-on-close.c gdbus-sessionbus.c gdbus-sessionbus.h gdbus-tests.h gdbus-tests.c
326 gdbus_exit_on_close_LDADD = $(progs_ldadd)
327
328 gdbus_example_watch_name_SOURCES = gdbus-example-watch-name.c
329 gdbus_example_watch_name_LDADD   = $(progs_ldadd)
330
331 gdbus_example_watch_proxy_SOURCES = gdbus-example-watch-proxy.c
332 gdbus_example_watch_proxy_LDADD   = $(progs_ldadd)
333
334 gdbus_example_own_name_SOURCES = gdbus-example-own-name.c
335 gdbus_example_own_name_LDADD   = $(progs_ldadd)
336
337 gdbus_example_server_SOURCES = gdbus-example-server.c
338 gdbus_example_server_LDADD   = $(progs_ldadd)
339
340 gdbus_example_unix_fd_client_SOURCES = gdbus-example-unix-fd-client.c
341 gdbus_example_unix_fd_client_LDADD   = $(progs_ldadd)
342
343 gdbus_example_subtree_SOURCES = gdbus-example-subtree.c
344 gdbus_example_subtree_LDADD   = $(progs_ldadd)
345
346 gdbus_example_peer_SOURCES = gdbus-example-peer.c
347 gdbus_example_peer_LDADD   = $(progs_ldadd)
348
349 gdbus_example_proxy_subclass_SOURCES = gdbus-example-proxy-subclass.c
350 gdbus_example_proxy_subclass_LDADD   = $(progs_ldadd)
351
352 gdbus_example_export_SOURCES = gdbus-example-export.c
353 gdbus_example_export_LDADD   = $(progs_ldadd)
354
355 gdbus_connection_flush_helper_SOURCES = gdbus-connection-flush-helper.c
356 gdbus_connection_flush_helper_LDADD = $(progs_ldadd)
357
358 appinfo_SOURCES = appinfo.c
359 appinfo_LDADD   = $(progs_ldadd)
360
361 appinfo_test_SOURCES = appinfo-test.c
362 appinfo_test_LDADD   = $(progs_ldadd)
363
364 contenttype_SOURCES = contenttype.c
365 contenttype_LDADD   = $(progs_ldadd)
366
367 file_SOURCES = file.c
368 file_LDADD   = $(progs_ldadd)
369
370 gapplication_SOURCES = gapplication.c gdbus-sessionbus.c
371 gapplication_LDADD = $(progs_ldadd)
372
373 gapplication_example_open_SOURCES = gapplication-example-open.c
374 gapplication_example_open_LDADD   = $(progs_ldadd)
375
376 gapplication_example_cmdline_SOURCES = gapplication-example-cmdline.c
377 gapplication_example_cmdline_LDADD   = $(progs_ldadd)
378
379 gapplication_example_cmdline2_SOURCES = gapplication-example-cmdline2.c
380 gapplication_example_cmdline2_LDADD   = $(progs_ldadd)
381
382 gapplication_example_cmdline3_SOURCES = gapplication-example-cmdline3.c
383 gapplication_example_cmdline3_LDADD   = $(progs_ldadd)
384
385 gapplication_example_actions_SOURCES = gapplication-example-actions.c
386 gapplication_example_actions_LDADD   = $(progs_ldadd)
387
388 schema_tests = \
389         schema-tests/array-default-not-in-choices.gschema.xml           \
390         schema-tests/bad-choice.gschema.xml                             \
391         schema-tests/bad-key.gschema.xml                                \
392         schema-tests/bad-key2.gschema.xml                               \
393         schema-tests/bad-key3.gschema.xml                               \
394         schema-tests/bad-key4.gschema.xml                               \
395         schema-tests/bad-type.gschema.xml                               \
396         schema-tests/bare-alias.gschema.xml                             \
397         schema-tests/choice-alias.gschema.xml                           \
398         schema-tests/choice-bad.gschema.xml                             \
399         schema-tests/choice-badtype.gschema.xml                         \
400         schema-tests/choice-invalid-alias.gschema.xml                   \
401         schema-tests/choice-missing-value.gschema.xml                   \
402         schema-tests/choice-shadowed-alias.gschema.xml                  \
403         schema-tests/choice-upside-down.gschema.xml                     \
404         schema-tests/choice.gschema.xml                                 \
405         schema-tests/choices-wrong-type.gschema.xml                     \
406         schema-tests/default-in-aliases.gschema.xml                     \
407         schema-tests/default-not-in-choices.gschema.xml                 \
408         schema-tests/default-out-of-range.gschema.xml                   \
409         schema-tests/empty-key.gschema.xml                              \
410         schema-tests/enum-with-aliases.gschema.xml                      \
411         schema-tests/enum-with-bad-default.gschema.xml                  \
412         schema-tests/enum-with-chained-alias.gschema.xml                \
413         schema-tests/enum-with-choice.gschema.xml                       \
414         schema-tests/enum-with-invalid-alias.gschema.xml                \
415         schema-tests/enum-with-repeated-alias.gschema.xml               \
416         schema-tests/enum-with-repeated-nick.gschema.xml                \
417         schema-tests/enum-with-repeated-value.gschema.xml               \
418         schema-tests/enum-with-shadow-alias.gschema.xml                 \
419         schema-tests/enum.gschema.xml                                   \
420         schema-tests/flags-aliased-default.gschema.xml                  \
421         schema-tests/flags-bad-default.gschema.xml                      \
422         schema-tests/flags-more-than-one-bit.gschema.xml                \
423         schema-tests/flags-with-enum-attr.gschema.xml                   \
424         schema-tests/flags-with-enum-tag.gschema.xml                    \
425         schema-tests/extend-and-shadow-indirect.gschema.xml             \
426         schema-tests/extend-and-shadow.gschema.xml                      \
427         schema-tests/extend-missing.gschema.xml                         \
428         schema-tests/extend-nonlist.gschema.xml                         \
429         schema-tests/extend-self.gschema.xml                            \
430         schema-tests/extend-wrong-list-indirect.gschema.xml             \
431         schema-tests/extend-wrong-list.gschema.xml                      \
432         schema-tests/extending.gschema.xml                              \
433         schema-tests/from-docs.gschema.xml                              \
434         schema-tests/incomplete-list.gschema.xml                        \
435         schema-tests/inherit-gettext-domain.gschema.xml                 \
436         schema-tests/invalid-path.gschema.xml                           \
437         schema-tests/key-in-list-indirect.gschema.xml                   \
438         schema-tests/key-in-list.gschema.xml                            \
439         schema-tests/list-of-missing.gschema.xml                        \
440         schema-tests/missing-quotes.gschema.xml                         \
441         schema-tests/no-default.gschema.xml                             \
442         schema-tests/overflow.gschema.xml                               \
443         schema-tests/override-missing.gschema.xml                       \
444         schema-tests/override-range-error.gschema.xml                   \
445         schema-tests/override-then-key.gschema.xml                      \
446         schema-tests/override-twice.gschema.xml                         \
447         schema-tests/override-type-error.gschema.xml                    \
448         schema-tests/override.gschema.xml                               \
449         schema-tests/range-badtype.gschema.xml                          \
450         schema-tests/range-default-high.gschema.xml                     \
451         schema-tests/range-default-low.gschema.xml                      \
452         schema-tests/range-high-default.gschema.xml                     \
453         schema-tests/range-low-default.gschema.xml                      \
454         schema-tests/range-missing-max.gschema.xml                      \
455         schema-tests/range-missing-min.gschema.xml                      \
456         schema-tests/range-parse-error.gschema.xml                      \
457         schema-tests/range-wrong-type.gschema.xml                       \
458         schema-tests/range.gschema.xml                                  \
459         schema-tests/wrong-category.gschema.xml
460
461 proxy_SOURCES = proxy.c
462 proxy_LDADD   = $(progs_ldadd) \
463         $(top_builddir)/gthread/libgthread-2.0.la
464
465 tls_certificate_SOURCES = tls-certificate.c gtesttlsbackend.c gtesttlsbackend.h
466 tls_certificate_LDADD   = $(progs_ldadd)
467
468 # -----------------------------------------------------------------------------
469
470 if OS_UNIX
471 gdbus_example_objectmanager_server_SOURCES  = gdbus-example-objectmanager-server.c
472 gdbus_example_objectmanager_server_CFLAGS   = -I$(top_builddir)/gio/tests/gdbus-object-manager-example
473 gdbus_example_objectmanager_server_LDADD    = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(progs_ldadd)
474
475 gdbus_example_objectmanager_client_SOURCES  = gdbus-example-objectmanager-client.c
476 gdbus_example_objectmanager_client_CFLAGS   = -I$(top_builddir)/gio/tests/gdbus-object-manager-example
477 gdbus_example_objectmanager_client_LDADD    = $(top_builddir)/gio/tests/gdbus-object-manager-example/libgdbus-example-objectmanager.la $(progs_ldadd)
478 endif OS_UNIX
479
480 # -----------------------------------------------------------------------------
481
482 EXTRA_DIST += \
483         socket-common.c                 \
484         org.gtk.test.gschema            \
485         org.gtk.test.gschema.xml        \
486         testenum.h                      \
487         enums.xml.template              \
488         de.po                           \
489         $(schema_tests)                 \
490         appinfo-test.desktop            \
491         appinfo-test2.desktop           \
492         appinfo-test-gnome.desktop      \
493         appinfo-test-notgnome.desktop   \
494         gdbus-testserver.py             \
495         test-codegen.xml                \
496         $(NULL)
497
498 MISC_STUFF = test.mo
499
500 test.mo: de.po
501         $(MSGFMT) -o test.mo $(srcdir)/de.po; \
502         $(MKDIR_P) de/LC_MESSAGES; \
503         cp -f test.mo de/LC_MESSAGES
504
505 CLEANFILES = gdbus-test-codegen-generated.[ch] gdbus-test-codegen-generated-doc-*.xml
506
507 DISTCLEANFILES = \
508         applications/mimeinfo.cache     \
509         org.gtk.test.enums.xml          \
510         de/LC_MESSAGES/test.mo          \
511         test.mo                         \
512         gsettings.store                 \
513         gschemas.compiled