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
13 # improve backtraces from test stuff
14 AM_LDFLAGS = @R_DYNAMIC_LDFLAG@
21 libdbus_testutils_la_CPPFLAGS = \
23 libdbus_testutils_la_SOURCES = \
27 libdbus_testutils_la_LIBADD = \
28 $(top_builddir)/dbus/libdbus-internal.la \
31 noinst_LTLIBRARIES = libdbus-testutils.la
34 ## break-loader removed for now
35 ## these binaries are used in tests but are not themselves tests
46 ## These are conceptually part of directories that come earlier in SUBDIRS
47 ## order, but we don't want to run them til we arrive in this directory,
48 ## since they depend on stuff from this directory
50 ../bus/bus-test$(EXEEXT) \
51 ../bus/bus-test-system$(EXEEXT) \
52 ../dbus/dbus-test$(EXEEXT) \
56 TESTS += ../bus/bus-test-launch-helper$(EXEEXT)
59 else !DBUS_BUILD_TESTS
64 endif !DBUS_BUILD_TESTS
66 noinst_PROGRAMS= $(TEST_BINARIES)
68 test_service_CPPFLAGS = $(static_cppflags)
69 test_service_LDADD = libdbus-testutils.la
70 test_names_CPPFLAGS = $(static_cppflags)
71 test_names_LDADD = libdbus-testutils.la
72 ## break_loader_CPPFLAGS = $(static_cppflags)
73 ## break_loader_LDADD = $(top_builddir)/dbus/libdbus-internal.la
74 test_shell_service_CPPFLAGS = $(static_cppflags)
75 test_shell_service_LDADD = libdbus-testutils.la
76 shell_test_CPPFLAGS = $(static_cppflags)
77 shell_test_LDADD = libdbus-testutils.la
78 spawn_test_CPPFLAGS = $(static_cppflags)
79 spawn_test_LDADD = $(top_builddir)/dbus/libdbus-internal.la
81 test_refs_SOURCES = internals/refs.c
82 test_refs_CPPFLAGS = $(static_cppflags)
83 test_refs_LDADD = libdbus-testutils.la $(GLIB_LIBS)
85 test_syslog_SOURCES = internals/syslog.c
86 test_syslog_CPPFLAGS = $(static_cppflags)
87 test_syslog_LDADD = libdbus-testutils.la $(GLIB_LIBS)
89 EXTRA_DIST = dbus-test-runner
91 testexecdir = $(libdir)/dbus-1.0/test
100 installable_tests += \
103 test-dbus-daemon-eavesdrop \
114 installcheck_environment = \
115 DBUS_TEST_DAEMON=$(DESTDIR)$(DBUS_DAEMONDIR)/dbus-daemon$(EXEEXT) \
116 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
117 DBUS_TEST_SYSCONFDIR=$(DESTDIR)$(sysconfdir)
119 TESTS_ENVIRONMENT = \
120 DBUS_BLOCK_ON_ABORT=1 \
121 DBUS_FATAL_WARNINGS=1 \
122 DBUS_TEST_DAEMON=@abs_top_builddir@/bus/dbus-daemon$(EXEEXT) \
123 DBUS_TEST_DATA=@abs_top_builddir@/test/data \
124 DBUS_TEST_HOMEDIR=@abs_top_builddir@/dbus \
127 test_corrupt_SOURCES = corrupt.c
128 test_corrupt_LDADD = $(top_builddir)/dbus/libdbus-1.la \
132 test_loopback_SOURCES = loopback.c
133 test_loopback_LDADD = $(top_builddir)/dbus/libdbus-1.la \
137 test_relay_SOURCES = relay.c
138 test_relay_LDADD = $(top_builddir)/dbus/libdbus-1.la \
142 test_dbus_daemon_SOURCES = dbus-daemon.c
143 test_dbus_daemon_LDADD = $(top_builddir)/dbus/libdbus-1.la \
147 test_dbus_daemon_eavesdrop_SOURCES = dbus-daemon-eavesdrop.c
148 test_dbus_daemon_eavesdrop_CPPFLAGS = $(GLIB_CFLAGS) $(DBUS_GLIB_CFLAGS)
149 test_dbus_daemon_eavesdrop_LDFLAGS = @R_DYNAMIC_LDFLAG@
150 test_dbus_daemon_eavesdrop_LDADD = $(top_builddir)/dbus/libdbus-1.la \
154 test_marshal_SOURCES = marshal.c
155 test_marshal_LDADD = $(top_builddir)/dbus/libdbus-1.la \
159 test_syntax_SOURCES = syntax.c
160 test_syntax_LDADD = $(top_builddir)/dbus/libdbus-1.la \
163 if DBUS_ENABLE_MODULAR_TESTS
164 TESTS += $(installable_tests)
165 installcheck_tests += $(installable_tests)
167 if DBUS_ENABLE_INSTALLED_TESTS
168 testexec_PROGRAMS += $(installable_tests)
169 else !DBUS_ENABLE_INSTALLED_TESTS
170 noinst_PROGRAMS += $(installable_tests)
171 endif !DBUS_ENABLE_INSTALLED_TESTS
173 endif DBUS_ENABLE_MODULAR_TESTS
175 # If we're installing the tests into a DESTDIR we can't run them
176 # again using the installed copy, because we don't know how to
177 # do a portable equivalent of setting LD_LIBRARY_PATH.
179 $(MAKE) check-TESTS TESTS='$$(installcheck_tests)' \
180 TESTS_ENVIRONMENT='$$(installcheck_environment)'
181 if DBUS_ENABLE_INSTALLED_TESTS
182 test -n "$(DESTDIR)" || \
183 $(installcheck_environment) \
184 $(srcdir)/dbus-test-runner \
187 endif DBUS_ENABLE_INSTALLED_TESTS
190 data/valid-config-files-system/debug-allow-all-fail.conf.in \
191 data/valid-config-files-system/debug-allow-all-pass.conf.in \
192 data/valid-config-files/debug-allow-all-sha1.conf.in \
193 data/valid-config-files/debug-allow-all.conf.in \
194 data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoExec.service.in \
195 data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoService.service.in \
196 data/invalid-service-files-system/org.freedesktop.DBus.TestSuiteNoUser.service.in \
197 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteEchoService.service.in \
198 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \
199 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \
200 data/valid-service-files-system/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \
201 data/valid-service-files/org.freedesktop.DBus.TestSuite.PrivServer.service.in \
202 data/valid-service-files/org.freedesktop.DBus.TestSuiteEchoService.service.in \
203 data/valid-service-files/org.freedesktop.DBus.TestSuiteForkingEchoService.service.in \
204 data/valid-service-files/org.freedesktop.DBus.TestSuiteSegfaultService.service.in \
205 data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceFail.service.in \
206 data/valid-service-files/org.freedesktop.DBus.TestSuiteShellEchoServiceSuccess.service.in \
209 EXTRA_DIST += $(in_data)
212 name-test/tmp-session-like-system.conf \
213 data/auth/anonymous-client-successful.auth-script \
214 data/auth/anonymous-server-successful.auth-script \
215 data/auth/cancel.auth-script \
216 data/auth/client-out-of-mechanisms.auth-script \
217 data/auth/external-failed.auth-script \
218 data/auth/external-root.auth-script \
219 data/auth/external-silly.auth-script \
220 data/auth/external-successful.auth-script \
221 data/auth/extra-bytes.auth-script \
222 data/auth/fail-after-n-attempts.auth-script \
223 data/auth/fallback.auth-script \
224 data/auth/invalid-command-client.auth-script \
225 data/auth/invalid-command.auth-script \
226 data/auth/invalid-hex-encoding.auth-script \
227 data/auth/mechanisms.auth-script \
228 data/equiv-config-files/basic/basic-1.conf \
229 data/equiv-config-files/basic/basic-2.conf \
230 data/equiv-config-files/basic/basic.d/basic.conf \
231 data/equiv-config-files/entities/basic.d/basic.conf \
232 data/equiv-config-files/entities/entities-1.conf \
233 data/equiv-config-files/entities/entities-2.conf \
234 data/incomplete-messages/missing-body.message \
235 data/invalid-config-files/badselinux-1.conf \
236 data/invalid-config-files/badselinux-2.conf \
237 data/invalid-config-files/circular-1.conf \
238 data/invalid-config-files/circular-2.conf \
239 data/invalid-config-files/circular-3.conf \
240 data/invalid-config-files/not-well-formed.conf \
241 data/invalid-config-files/truncated-file.conf \
242 data/invalid-messages/array-of-nil.message \
243 data/invalid-messages/array-with-mixed-types.message \
244 data/invalid-messages/bad-boolean-array.message \
245 data/invalid-messages/bad-boolean.message \
246 data/invalid-messages/bad-endian.message \
247 data/invalid-messages/bad-header-field-alignment.message \
248 data/invalid-messages/boolean-has-no-value.message-raw \
249 data/invalid-messages/local-namespace.message \
250 data/invalid-messages/no-dot-in-name.message \
251 data/invalid-messages/not-nul-header-padding.message \
252 data/invalid-messages/overlong-name.message \
253 data/invalid-messages/too-little-header-padding.message \
254 data/invalid-messages/too-much-header-padding-by-far.message \
255 data/invalid-messages/too-much-header-padding.message \
256 data/invalid-messages/too-short-dict.message \
257 data/sha-1/Readme.txt \
258 data/sha-1/bit-hashes.sha1 \
259 data/sha-1/bit-messages.sha1 \
260 data/sha-1/byte-hashes.sha1 \
261 data/sha-1/byte-messages.sha1 \
262 data/valid-config-files/basic.conf \
263 data/valid-config-files/basic.d/basic.conf \
264 data/valid-config-files/entities.conf \
265 data/valid-config-files/incoming-limit.conf \
266 data/valid-config-files/many-rules.conf \
267 data/valid-config-files/system.d/test.conf \
268 data/valid-messages/array-of-array-of-uint32.message \
269 data/valid-messages/dict-simple.message \
270 data/valid-messages/dict.message \
271 data/valid-messages/emptiness.message \
272 data/valid-messages/lots-of-arguments.message \
273 data/valid-messages/no-padding.message \
274 data/valid-messages/opposite-endian.message \
275 data/valid-messages/recursive-types.message \
276 data/valid-messages/simplest-manual.message \
277 data/valid-messages/simplest.message \
278 data/valid-messages/standard-acquire-service.message \
279 data/valid-messages/standard-hello.message \
280 data/valid-messages/standard-list-services.message \
281 data/valid-messages/standard-service-exists.message \
282 data/valid-messages/unknown-header-field.message \
285 EXTRA_DIST += $(static_data)
287 ## copy tests to builddir so that generated tests and static tests
288 ## are all in one place.
290 $(AM_V_at)$(INSTALL) -d data/valid-config-files/session.d
291 $(AM_V_at)set -e && \
292 if test $(srcdir) = . || test $(srcdir) -ef .; then \
293 echo '-- No need to copy test data as srcdir = builddir'; \
295 for F in $(static_data); do \
296 $(INSTALL) -d $${F%/*}; \
297 $(INSTALL_DATA) $(srcdir)/$$F $$F; \
301 ## this doesn't clean most copied test data files when srcdir=builddir
303 $(AM_V_at)if test $(srcdir) = . || test $(srcdir) -ef .; then \
304 echo '-- No need to clean test data as srcdir = builddir'; \
306 rm -f $(static_data); \
310 data/valid-config-files/session.conf \
311 data/valid-config-files/system.conf \
314 noinst_DATA = $(imported_data)
315 CLEANFILES = $(noinst_DATA)
317 data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
318 $(AM_V_at)$(INSTALL) -d data/valid-config-files
319 $(AM_V_GEN)$(INSTALL_DATA) $< $@
321 data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
322 $(AM_V_at)$(INSTALL) -d data/valid-config-files
323 $(AM_V_GEN)$(INSTALL_DATA) $< $@