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