2 INCLUDES=-I$(top_srcdir) $(DBUS_TEST_CFLAGS)
5 TEST_BINARIES=test-service echo-client echo-server unbase64 break-loader spawn-test
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= \
43 TEST_LIBS=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
45 echo_client_LDADD=$(TEST_LIBS)
46 echo_server_LDADD=$(TEST_LIBS)
47 test_service_LDADD=$(TEST_LIBS)
48 unbase64_LDADD=$(TEST_LIBS)
49 break_loader_LDADD= $(TEST_LIBS)
50 #bus_test_LDADD=$(TEST_LIBS) $(top_builddir)/bus/libdbus-daemon.la
51 spawn_test_LDADD=$(TEST_LIBS)
55 ## keep these in creation order, i.e. uppermost dirs first
59 data/invalid-messages \
60 data/incomplete-messages \
63 data/valid-config-files \
64 data/valid-config-files/basic.d \
65 data/valid-service-files
67 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"
70 for D in $(TESTDIRS); do \
71 test -d $(distdir)/$$D || mkdir $(distdir)/$$D || exit 1 ; \
73 FILES=`$(FIND_TESTS)` ; \
74 for F in $$FILES; do \
75 echo '-- Disting file '$$F ; \
76 cp $$F $(distdir)/$$F || exit 1 ; \
79 ## copy tests to builddir so that generated tests and static tests
80 ## are all in one place.
82 for D in $(TESTDIRS); do \
83 test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \
85 if test $(srcdir) != . ; then \
86 FILES=`(cd $(srcdir) && $(FIND_TESTS))` ; \
87 for F in $$FILES; do \
89 DEST=$(top_builddir)/test/$$F ; \
90 echo '-- Copying test file '$$F ; \
91 cp $$SRC $$DEST || exit 1 ; \
92 chmod u+w $$DEST || exit 1 ; \
95 echo '-- No need to copy test data as srcdir = builddir' ; \
97 echo '-- Copying' $(top_builddir)/bus/*.conf 'to test directory' ; \
98 cp $(top_builddir)/bus/*.conf $(top_builddir)/test/data/valid-config-files || exit 1 ; \
99 chmod u+w $(top_builddir)/test/data/valid-config-files/*.conf || exit 1
101 ## this doesn't clean generated test data files when srcdir=builddir
103 if test $(srcdir) != . ; then \
104 FILES=`(cd $(top_builddir)/test && $(FIND_TESTS))` ; \
105 for F in $$FILES; do \
106 DEST=$(top_builddir)/test/$$F ; \
107 echo '-- Deleting test file '$$F ; \
108 rm $$DEST || exit 1 ; \
111 for D in $(TESTDIRS); do \
112 REVERSEDIRS="$$D $$REVERSEDIRS" ; \
114 for D in $$REVERSEDIRS; do \
115 rmdir $(top_builddir)/test/$$D || exit 1 ; \