9 INCLUDES=-I$(top_srcdir) $(DBUS_TEST_CFLAGS)
13 TEST_BINARIES=test-service break-loader spawn-test test-segfault test-exit test-sleep-forever
19 GCOV_BINARIES=decode-gcov
24 noinst_PROGRAMS= $(TEST_BINARIES) $(GCOV_BINARIES)
26 test_service_SOURCES= \
31 break_loader_SOURCES= \
40 test_segfault_SOURCES = \
43 test_sleep_forever_SOURCES = \
46 decode_gcov_SOURCES= \
49 TEST_LIBS=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
51 test_service_LDADD=$(TEST_LIBS)
52 break_loader_LDADD= $(TEST_LIBS)
53 spawn_test_LDADD=$(TEST_LIBS)
54 decode_gcov_LDADD=$(TEST_LIBS)
58 ## keep these in creation order, i.e. uppermost dirs first
62 data/invalid-messages \
63 data/incomplete-messages \
66 data/valid-config-files \
67 data/valid-config-files/basic.d \
68 data/valid-config-files/system.d \
69 data/valid-service-files \
70 data/invalid-config-files \
71 data/equiv-config-files \
72 data/equiv-config-files/basic \
73 data/equiv-config-files/basic/basic.d \
74 data/equiv-config-files/entities \
75 data/equiv-config-files/entities/basic.d
78 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"
81 for D in $(TESTDIRS); do \
82 test -d $(distdir)/$$D || mkdir $(distdir)/$$D || exit 1 ; \
84 FILES=`(cd $(srcdir) && $(FIND_TESTS) -o -name "*.in" -a -not -name Makefile.in)` ; \
85 for F in $$FILES; do \
86 echo '-- Disting file '$$F ; \
87 cp $(srcdir)/$$F $(distdir)/$$F || exit 1 ; \
90 ## copy tests to builddir so that generated tests and static tests
91 ## are all in one place.
93 for D in $(TESTDIRS); do \
94 test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \
96 if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \
97 FILES=`(cd $(srcdir) && $(FIND_TESTS))` ; \
98 for F in $$FILES; do \
100 DEST=$(top_builddir)/test/$$F ; \
101 echo '-- Copying test file '$$F ; \
102 cp $$SRC $$DEST || exit 1 ; \
103 chmod u+w $$DEST || exit 1 ; \
106 echo '-- No need to copy test data as srcdir = builddir' ; \
108 echo '-- Copying' $(top_builddir)/bus/*.conf 'to test directory' ; \
109 cp $(top_builddir)/bus/*.conf $(top_builddir)/test/data/valid-config-files || exit 1 ; \
110 chmod u+w $(top_builddir)/test/data/valid-config-files/*.conf || exit 1
112 ## this doesn't clean generated test data files when srcdir=builddir
114 if test $(srcdir) != . ; then \
115 FILES=`(cd $(top_builddir)/test && $(FIND_TESTS))` ; \
116 for F in $$FILES; do \
117 DEST=$(top_builddir)/test/$$F ; \
118 echo '-- Deleting test file '$$F ; \
119 rm $$DEST || exit 1 ; \
122 for D in $(TESTDIRS); do \
123 REVERSEDIRS="$$D $$REVERSEDIRS" ; \
125 for D in $$REVERSEDIRS; do \
126 rmdir $(top_builddir)/test/$$D || exit 1 ; \