2 INCLUDES=-I$(top_srcdir) $(DBUS_TEST_CFLAGS)
5 TEST_BINARIES=test-service echo-client echo-server unbase64 break-loader spawn-test test-segfault test-exit test-sleep-forever
10 noinst_PROGRAMS= $(TEST_BINARIES)
12 echo_client_SOURCES= \
17 echo_server_SOURCES= \
22 test_service_SOURCES= \
30 # bus_test_SOURCES = \
37 break_loader_SOURCES= \
46 test_segfault_SOURCES = \
49 test_sleep_forever_SOURCES = \
52 TEST_LIBS=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
54 echo_client_LDADD=$(TEST_LIBS)
55 echo_server_LDADD=$(TEST_LIBS)
56 test_service_LDADD=$(TEST_LIBS)
57 unbase64_LDADD=$(TEST_LIBS)
58 break_loader_LDADD= $(TEST_LIBS)
59 #bus_test_LDADD=$(TEST_LIBS) $(top_builddir)/bus/libdbus-daemon.la
60 spawn_test_LDADD=$(TEST_LIBS)
64 ## keep these in creation order, i.e. uppermost dirs first
68 data/invalid-messages \
69 data/incomplete-messages \
72 data/valid-config-files \
73 data/valid-config-files/basic.d \
74 data/valid-service-files
76 FIND_TESTS=find -name "*.message" -o -name "*.message-raw" -o -name "*.auth-script" -o -name "*.sha1" -o -name "*.txt" -o -name "*.conf" -o -name "*.service"
79 for D in $(TESTDIRS); do \
80 test -d $(distdir)/$$D || mkdir $(distdir)/$$D || exit 1 ; \
82 FILES=`$(FIND_TESTS)` ; \
83 for F in $$FILES; do \
84 echo '-- Disting file '$$F ; \
85 cp $$F $(distdir)/$$F || exit 1 ; \
88 ## copy tests to builddir so that generated tests and static tests
89 ## are all in one place.
91 for D in $(TESTDIRS); do \
92 test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \
94 if test $(srcdir) != . ; then \
95 FILES=`(cd $(srcdir) && $(FIND_TESTS))` ; \
96 for F in $$FILES; do \
98 DEST=$(top_builddir)/test/$$F ; \
99 echo '-- Copying test file '$$F ; \
100 cp $$SRC $$DEST || exit 1 ; \
101 chmod u+w $$DEST || exit 1 ; \
104 echo '-- No need to copy test data as srcdir = builddir' ; \
106 echo '-- Copying' $(top_builddir)/bus/*.conf 'to test directory' ; \
107 cp $(top_builddir)/bus/*.conf $(top_builddir)/test/data/valid-config-files || exit 1 ; \
108 chmod u+w $(top_builddir)/test/data/valid-config-files/*.conf || exit 1
110 ## this doesn't clean generated test data files when srcdir=builddir
112 if test $(srcdir) != . ; then \
113 FILES=`(cd $(top_builddir)/test && $(FIND_TESTS))` ; \
114 for F in $$FILES; do \
115 DEST=$(top_builddir)/test/$$F ; \
116 echo '-- Deleting test file '$$F ; \
117 rm $$DEST || exit 1 ; \
120 for D in $(TESTDIRS); do \
121 REVERSEDIRS="$$D $$REVERSEDIRS" ; \
123 for D in $$REVERSEDIRS; do \
124 rmdir $(top_builddir)/test/$$D || exit 1 ; \