summaryrefslogtreecommitdiff
path: root/tests/dbus/Makefile.am
blob: da3a6316d5879f3b449b27455e19e8776701c2d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
noinst_PROGRAMS = \
    test-account \
    test-account-channel-request \
    test-account-manager \
    test-base-client \
    test-call-cancellation \
    test-call-example \
    test-callable-example \
    test-channel-dispatcher \
    test-channel-dispatch-operation \
    test-channel-introspect \
    test-channel-request \
    test-cli-group \
    test-client \
    test-cm \
    test-connection \
    test-connection-bug-18845 \
    test-connection-error \
    test-connection-handles \
    test-connection-inject-bug16307 \
    test-connection-getinterfaces-failure \
    test-contact-lists \
    test-contacts \
    test-contacts-bug-19101 \
    test-contacts-mixin \
    test-contacts-slow-path \
    test-dbus \
    test-disconnection \
    test-error-enum \
    test-example-no-protocols \
    test-finalized-in-invalidated-handler \
    test-get-interface-after-invalidate \
    test-group-mixin \
    test-handle-repo \
    test-handle-set \
    test-invalidated-while-invoking-signals \
    test-long-connection-name \
    test-message-mixin \
    test-params-cm \
    test-properties \
    test-protocol-objects \
    test-self-handle \
    test-self-presence \
    test-simple-approver \
    test-simple-handler \
    test-simple-observer \
    test-text-mixin \
    test-text-respawn \
    test-unsupported-interface

TESTS = $(noinst_PROGRAMS)

LDADD = \
    $(top_builddir)/tests/lib/libtp-glib-tests.la \
    $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
    $(GLIB_LIBS) \
    $(DBUS_LIBS) \
    $(NULL)

test_account_SOURCES = account.c

test_account_channel_request_SOURCES = account-channel-request.c

test_account_manager_SOURCES = account-manager.c

test_base_client_SOURCES = base-client.c

test_call_cancellation_SOURCES = call-cancellation.c

test_channel_dispatcher_SOURCES = channel-dispatcher.c

test_channel_dispatch_operation_SOURCES = channel-dispatch-operation.c

test_channel_introspect_SOURCES = channel-introspect.c

test_channel_request_SOURCES = channel-request.c

test_call_example_SOURCES = call-example.c
test_call_example_LDADD = \
    $(LDADD) \
    $(top_builddir)/examples/future/call-cm/libexample-cm-call.la

test_callable_example_SOURCES = callable-example.c
test_callable_example_LDADD = \
    $(LDADD) \
    $(top_builddir)/examples/cm/callable/libexample-cm-callable.la

test_client_SOURCES = client.c

test_cli_group_SOURCES = cli-group.c

test_cm_SOURCES = cm.c

test_connection_SOURCES = connection.c

test_contact_lists_SOURCES = contact-lists.c
test_contact_lists_LDADD = \
    $(LDADD) \
    $(top_builddir)/examples/cm/contactlist/libexample-cm-contactlist.la

test_connection_bug_18845_SOURCES = connection-bug-18845.c

test_connection_handles_SOURCES = connection-handles.c

test_connection_error_SOURCES = connection-error.c

test_connection_inject_bug16307_SOURCES = connection-inject-bug16307.c

test_connection_getinterfaces_failure_SOURCES = \
    connection-getinterfaces-failure.c

test_contacts_SOURCES = contacts.c

test_contacts_bug_19101_SOURCES = contacts-bug-19101.c

test_contacts_mixin_SOURCES = contacts-mixin.c

test_contacts_slow_path_SOURCES = contacts-slow-path.c

test_dbus_SOURCES = dbus.c

test_disconnection_SOURCES = disconnection.c

test_error_enum_SOURCES = error-enum.c
nodist_test_error_enum_SOURCES = _gen/errors-check.h

test_example_no_protocols_SOURCES = example-no-protocols.c

test_finalized_in_invalidated_handler_SOURCES = \
    finalized-in-invalidated-handler.c

test_get_interface_after_invalidate_SOURCES = \
    get-interface-after-invalidate.c

test_group_mixin_SOURCES = group-mixin.c

test_handle_repo_SOURCES = handle-repo.c

test_handle_set_SOURCES = handle-set.c

test_invalidated_while_invoking_signals_SOURCES = \
    invalidated-while-invoking-signals.c

test_long_connection_name_SOURCES = long-connection-name.c

test_message_mixin_LDADD = \
    $(LDADD) \
    $(top_builddir)/examples/cm/echo-message-parts/libexample-cm-echo-2.la
test_message_mixin_SOURCES = \
    message-mixin.c

test_properties_SOURCES = properties.c
nodist_test_properties_SOURCES = \
    _gen/svc.h \
    _gen/svc.c

test_protocol_objects_LDADD = \
    $(LDADD) \
    $(top_builddir)/examples/cm/echo-message-parts/libexample-cm-echo-2.la
test_protocol_objects_SOURCES = protocol-objects.c

test_self_handle_SOURCES = self-handle.c

test_self_presence_SOURCES = self-presence.c

test_text_mixin_SOURCES = text-mixin.c

test_text_respawn_SOURCES = text-respawn.c

test_unsupported_interface_SOURCES = unsupported-interface.c

test_params_cm_SOURCES = \
    params-cm.c

test_simple_observer_SOURCES = simple-observer.c

test_simple_approver_SOURCES = simple-approver.c

test_simple_handler_SOURCES = simple-handler.c

check_c_sources = *.c
include $(top_srcdir)/tools/check-coding-style.mk
check-local: check-coding-style

AM_CPPFLAGS = \
    -I${top_srcdir} -I${top_builddir} \
    -D_TP_IGNORE_DEPRECATIONS \
    $(GLIB_CFLAGS) \
    $(DBUS_CFLAGS) \
    $(NULL)

AM_CFLAGS = $(ERROR_CFLAGS)

TESTS_ENVIRONMENT = \
    abs_top_builddir=@abs_top_builddir@ \
    XDG_DATA_HOME=@abs_builddir@ \
    XDG_DATA_DIRS=@abs_srcdir@ \
    G_SLICE=debug-blocks \
    G_DEBUG=fatal_warnings,fatal_criticals$(maybe_gc_friendly) \
    sh $(top_srcdir)/tools/with-session-bus.sh \
        --config-file=dbus-1/session.conf -- \
    $(EXTRA_TESTS_ENVIRONMENT)

EXTRA_TESTS_ENVIRONMENT =

check-valgrind:
	$(MAKE) check-TESTS \
		maybe_gc_friendly=,gc-friendly \
		TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)"

include $(top_srcdir)/tools/valgrind.mk

VALGRIND_TESTS_ENVIRONMENT = \
    $(TESTS_ENVIRONMENT) \
    env G_SLICE=always-malloc \
    $(top_builddir)/libtool --mode=execute \
    $(VALGRIND) --suppressions=$(top_srcdir)/tests/tests.supp $(VALGRIND_FLAGS)

BUILT_SOURCES = \
	dbus-1/session.conf \
	_gen/errors-check.h \
	_gen/svc.h \
	_gen/svc.c

CLEANFILES = \
    $(BUILT_SOURCES)

distclean-local:
	rm -rf _gen

EXTRA_DIST = \
    dbus-1/session.conf.in \
    dbus-1/services/spurious.service \
    telepathy/managers/spurious.manager \
    telepathy/managers/test_manager_file.manager \
    telepathy/managers/test_manager_file_invalid.manager \
    with-properties.xml

dbus-1/%.conf: $(srcdir)/dbus-1/%.conf.in
	$(AM_V_at)$(mkdir_p) dbus-1
	$(AM_V_GEN)sed -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" $< > $@

_gen/svc.c _gen/svc.h: with-properties.xml \
	$(top_srcdir)/tools/glib-ginterface-gen.py \
	Makefile.am
	$(AM_V_at)$(mkdir_p) _gen
	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-ginterface-gen.py \
		--filename=_gen/svc \
		--signal-marshal-prefix=NOT_NEEDED \
		$< Test_Svc_

_gen/errors-check.h: $(top_srcdir)/spec/errors.xml \
	$(top_srcdir)/tools/glib-errors-check-gen.py
	$(AM_V_at)$(mkdir_p) _gen
	$(AM_V_GEN)$(PYTHON) $(top_srcdir)/tools/glib-errors-check-gen.py $< > $@