1 ## the "name-test" subdir in fact contains a bunch of tests now that need a temporary bus
2 ## to be running to do stuff with. The directory should be renamed.
3 ## We want to build the current directory first to pick up the testutils lib
7 # CPPFLAGS for binaries that are normally dynamic
10 $(DBUS_STATIC_BUILD_CPPFLAGS) \
15 # improve backtraces from test stuff
16 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
18 # CPPFLAGS for binaries that are always static
24 libdbus_testutils_la_CPPFLAGS = \
26 libdbus_testutils_la_SOURCES = \
30 libdbus_testutils_la_LIBADD = \
31 $(top_builddir)/dbus/libdbus-internal.la \
34 noinst_LTLIBRARIES = libdbus-testutils.la
37 ## break-loader removed for now
38 ## these binaries are used in tests but are not themselves tests
49 ## These are conceptually part of directories that come earlier in SUBDIRS
50 ## order, but we don't want to run them til we arrive in this directory,
51 ## since they depend on stuff from this directory
53 ../bus/bus-test$(EXEEXT) \
54 ../bus/bus-test-system$(EXEEXT) \
55 ../dbus/dbus-test$(EXEEXT) \
59 TESTS += ../bus/bus-test-launch-helper$(EXEEXT)
62 else !DBUS_BUILD_TESTS
67 endif !DBUS_BUILD_TESTS
69 noinst_PROGRAMS= $(TEST_BINARIES)
71 test_service_CPPFLAGS = $(static_cppflags)
72 test_service_LDADD = libdbus-testutils.la
73 test_names_CPPFLAGS = $(static_cppflags)
74 test_names_LDADD = libdbus-testutils.la
75 ## break_loader_CPPFLAGS = $(static_cppflags)
76 ## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
77 test_shell_service_CPPFLAGS = $(static_cppflags)
78 test_shell_service_LDADD = libdbus-testutils.la
79 shell_test_CPPFLAGS = $(static_cppflags)
80 shell_test_LDADD = libdbus-testutils.la
81 spawn_test_CPPFLAGS = $(static_cppflags)
82 spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
84 test_refs_SOURCES = internals/refs.c
85 test_refs_CPPFLAGS = $(static_cppflags)
86 test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
88 test_syslog_SOURCES = internals/syslog.c
89 test_syslog_CPPFLAGS = $(static_cppflags)
90 test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
92 EXTRA_DIST = dbus-test-runner
94 testexecdir = $(libdir)/dbus-1.0/test
103 installable_tests += \
106 test-dbus-daemon-eavesdrop \
117 installcheck_environment = \
118 DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \
119 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
120 DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
122 TESTS_ENVIRONMENT = \
123 DBUS_BLOCK_ON_ABORT=1 \
124 DBUS_FATAL_WARNINGS=1 \
125 DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
126 DBUS_TEST_DATA=@abs_top_builddir@/test/data \
127 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
130 test_corrupt_SOURCES = corrupt.c
131 test_corrupt_LDADD = $(top_builddir)/dbus/libdbus-1.la \
135 test_loopback_SOURCES = loopback.c
136 test_loopback_LDADD = $(top_builddir)/dbus/libdbus-1.la \
140 test_relay_SOURCES = relay.c
141 test_relay_LDADD = $(top_builddir)/dbus/libdbus-1.la \
145 test_dbus_daemon_SOURCES = dbus-daemon.c
146 test_dbus_daemon_LDADD = $(top_builddir)/dbus/libdbus-1.la \
150 test_dbus_daemon_eavesdrop_SOURCES = dbus-daemon-eavesdrop.c
151 test_dbus_daemon_eavesdrop_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
152 test_dbus_daemon_eavesdrop_LDFLAGS = @R_DYNAMIC_LDFLAG@
153 test_dbus_daemon_eavesdrop_LDADD = $(top_builddir)/dbus/libdbus-1.la \
157 test_marshal_SOURCES = marshal.c
158 test_marshal_LDADD = $(top_builddir)/dbus/libdbus-1.la \
162 test_syntax_SOURCES = syntax.c
163 test_syntax_LDADD = $(top_builddir)/dbus/libdbus-1.la \
166 if DBUS_ENABLE_MODULAR_TESTS
167 TESTS += $(installable_tests)
168 installcheck_tests += $(installable_tests)
170 if DBUS_ENABLE_INSTALLED_TESTS
171 testexec_PROGRAMS += $(installable_tests)
172 else !DBUS_ENABLE_INSTALLED_TESTS
173 noinst_PROGRAMS += $(installable_tests)
174 endif !DBUS_ENABLE_INSTALLED_TESTS
176 endif DBUS_ENABLE_MODULAR_TESTS
178 # If we're installing the tests into a DESTDIR we can't run them
179 # again using the installed copy, because we don't know how to
180 # do a portable equivalent of setting LD_LIBRARY_PATH.
182 $(MAKE) check-TESTS TESTS='$$(installcheck_tests)' \
183 TESTS_ENVIRONMENT='$$(installcheck_environment)'
184 if DBUS_ENABLE_INSTALLED_TESTS
185 test -n "$(DESTDIR)" || \
186 $(installcheck_environment) \
187 $(srcdir)/dbus-test-runner \
190 endif DBUS_ENABLE_INSTALLED_TESTS
193 data/valid-config-files-system/debug-allow-all-fail.conf.in \
194 data/valid-config-files-system/debug-allow-all-pass.conf.in \
195 data/valid-config-files/debug-allow-all-sha1.conf.in \
196 data/valid-config-files/debug-allow-all.conf.in \
197 data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \
198 data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \
199 data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \
200 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service.in \
201 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \
202 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \
203 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \
204 data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in \
205 data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service.in \
206 data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in \
207 data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \
208 data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \
209 data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \
212 EXTRA_DIST += $(in_data)
215 name-test/tmp-session-like-system.conf \
216 data/auth/anonymous-client-successful.auth-script \
217 data/auth/anonymous-server-successful.auth-script \
218 data/auth/cancel.auth-script \
219 data/auth/client-out-of-mechanisms.auth-script \
220 data/auth/external-failed.auth-script \
221 data/auth/external-root.auth-script \
222 data/auth/external-silly.auth-script \
223 data/auth/external-successful.auth-script \
224 data/auth/extra-bytes.auth-script \
225 data/auth/fail-after-n-attempts.auth-script \
226 data/auth/fallback.auth-script \
227 data/auth/invalid-command-client.auth-script \
228 data/auth/invalid-command.auth-script \
229 data/auth/invalid-hex-encoding.auth-script \
230 data/auth/mechanisms.auth-script \
231 data/equiv-config-files/basic/basic-1.conf \
232 data/equiv-config-files/basic/basic-2.conf \
233 data/equiv-config-files/basic/basic.d/basic.conf \
234 data/equiv-config-files/entities/basic.d/basic.conf \
235 data/equiv-config-files/entities/entities-1.conf \
236 data/equiv-config-files/entities/entities-2.conf \
237 data/incomplete-messages/missing-body.message \
238 data/invalid-config-files/badselinux-1.conf \
239 data/invalid-config-files/badselinux-2.conf \
240 data/invalid-config-files/circular-1.conf \
241 data/invalid-config-files/circular-2.conf \
242 data/invalid-config-files/circular-3.conf \
243 data/invalid-config-files/not-well-formed.conf \
244 data/invalid-config-files/truncated-file.conf \
245 data/invalid-messages/array-of-nil.message \
246 data/invalid-messages/array-with-mixed-types.message \
247 data/invalid-messages/bad-boolean-array.message \
248 data/invalid-messages/bad-boolean.message \
249 data/invalid-messages/bad-endian.message \
250 data/invalid-messages/bad-header-field-alignment.message \
251 data/invalid-messages/boolean-has-no-value.message-raw \
252 data/invalid-messages/local-namespace.message \
253 data/invalid-messages/no-dot-in-name.message \
254 data/invalid-messages/not-nul-header-padding.message \
255 data/invalid-messages/overlong-name.message \
256 data/invalid-messages/too-little-header-padding.message \
257 data/invalid-messages/too-much-header-padding-by-far.message \
258 data/invalid-messages/too-much-header-padding.message \
259 data/invalid-messages/too-short-dict.message \
260 data/sha-1/Readme.txt \
261 data/sha-1/bit-hashes.sha1 \
262 data/sha-1/bit-messages.sha1 \
263 data/sha-1/byte-hashes.sha1 \
264 data/sha-1/byte-messages.sha1 \
265 data/valid-config-files/basic.conf \
266 data/valid-config-files/basic.d/basic.conf \
267 data/valid-config-files/entities.conf \
268 data/valid-config-files/incoming-limit.conf \
269 data/valid-config-files/many-rules.conf \
270 data/valid-config-files/system.d/test.conf \
271 data/valid-messages/array-of-array-of-uint32.message \
272 data/valid-messages/dict-simple.message \
273 data/valid-messages/dict.message \
274 data/valid-messages/emptiness.message \
275 data/valid-messages/lots-of-arguments.message \
276 data/valid-messages/no-padding.message \
277 data/valid-messages/opposite-endian.message \
278 data/valid-messages/recursive-types.message \
279 data/valid-messages/simplest-manual.message \
280 data/valid-messages/simplest.message \
281 data/valid-messages/standard-acquire-service.message \
282 data/valid-messages/standard-hello.message \
283 data/valid-messages/standard-list-services.message \
284 data/valid-messages/standard-service-exists.message \
285 data/valid-messages/unknown-header-field.message \
288 EXTRA_DIST += $(static_data)
290 ## copy tests to builddir so that generated tests and static tests
291 ## are all in one place.
293 $(AM_V_at)$(MKDIR_P) data/valid-config-files/session.d
294 $(AM_V_at)set -e && \
295 if test $(srcdir) = . || test $(srcdir) -ef .; then \
296 echo '-- No need to copy test data as srcdir = builddir'; \
298 for F in $(static_data); do \
299 $(MKDIR_P) $${F%/*}; \
301 cp $(srcdir)/$$F $$F; \
305 ## this doesn't clean most copied test data files when srcdir=builddir
307 $(AM_V_at)if test $(srcdir) = . || test $(srcdir) -ef .; then \
308 echo '-- No need to clean test data as srcdir = builddir'; \
310 rm -f $(static_data); \
314 data/valid-config-files/session.conf \
315 data/valid-config-files/system.conf \
318 noinst_DATA = $(imported_data)
319 CLEANFILES = $(noinst_DATA)
321 data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
322 $(AM_V_at)$(MKDIR_P) data/valid-config-files
325 data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
326 $(AM_V_at)$(MKDIR_P) data/valid-config-files