4 INCLUDES=-I$(top_srcdir) $(DBUS_TEST_CFLAGS)
8 ## break-loader removed for now
9 TEST_BINARIES=test-service test-names test-shell-service shell-test spawn-test test-segfault test-exit test-sleep-forever
11 #enable stand alone make check test
19 GCOV_BINARIES=decode-gcov
24 noinst_PROGRAMS= $(TEST_BINARIES) $(GCOV_BINARIES)
26 test_service_SOURCES= \
36 ##break_loader_SOURCES= \
39 test_shell_service_SOURCES = \
40 test-shell-service.c \
53 test_segfault_SOURCES = \
56 test_sleep_forever_SOURCES = \
59 decode_gcov_SOURCES= \
62 TEST_LIBS=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
64 test_service_LDADD=$(TEST_LIBS)
65 test_names_LDADD=$(TEST_LIBS)
66 ## break_loader_LDADD= $(TEST_LIBS)
67 test_shell_service_LDADD=$(TEST_LIBS)
68 shell_test_LDADD=$(TEST_LIBS)
69 spawn_test_LDADD=$(TEST_LIBS)
70 decode_gcov_LDADD=$(TEST_LIBS)
74 ## keep these in creation order, i.e. uppermost dirs first
78 data/invalid-messages \
79 data/incomplete-messages \
82 data/valid-config-files \
83 data/valid-config-files/basic.d \
84 data/valid-config-files/system.d \
85 data/valid-service-files \
86 data/invalid-config-files \
87 data/equiv-config-files \
88 data/equiv-config-files/basic \
89 data/equiv-config-files/basic/basic.d \
90 data/equiv-config-files/entities \
91 data/equiv-config-files/entities/basic.d
94 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"
97 for D in $(TESTDIRS); do \
98 test -d $(distdir)/$$D || mkdir $(distdir)/$$D || exit 1 ; \
100 FILES=`(cd $(srcdir) && $(FIND_TESTS) -o -name "*.in" -a -not -name Makefile.in)` ; \
101 for F in $$FILES; do \
102 echo '-- Disting file '$$F ; \
103 cp -f $(srcdir)/$$F $(distdir)/$$F || exit 1 ; \
106 ## copy tests to builddir so that generated tests and static tests
107 ## are all in one place.
109 for D in $(TESTDIRS); do \
110 test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \
112 if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \
113 FILES=`(cd $(srcdir) && $(FIND_TESTS))` ; \
114 for F in $$FILES; do \
115 SRC=$(srcdir)/$$F ; \
116 DEST=$(top_builddir)/test/$$F ; \
117 echo '-- Copying test file '$$F ; \
118 cp $$SRC $$DEST || exit 1 ; \
119 chmod u+w $$DEST || exit 1 ; \
122 echo '-- No need to copy test data as srcdir = builddir' ; \
124 echo '-- Copying' $(top_builddir)/bus/*.conf 'to test directory' ; \
125 cp $(top_builddir)/bus/*.conf $(top_builddir)/test/data/valid-config-files || exit 1 ; \
126 chmod u+w $(top_builddir)/test/data/valid-config-files/*.conf || exit 1
128 ## this doesn't clean generated test data files when srcdir=builddir
130 if test $(srcdir) != . ; then \
131 FILES=`(cd $(top_builddir)/test && $(FIND_TESTS))` ; \
132 for F in $$FILES; do \
133 DEST=$(top_builddir)/test/$$F ; \
134 echo '-- Deleting test file '$$F ; \
135 rm $$DEST || exit 1 ; \
138 for D in $(TESTDIRS); do \
139 REVERSEDIRS="$$D $$REVERSEDIRS" ; \
141 for D in $$REVERSEDIRS; do \
142 rmdir $(top_builddir)/test/$$D || exit 1 ; \