9 INCLUDES=-I$(top_srcdir) $(DBUS_TEST_CFLAGS)
13 ## break-loader removed for now
14 TEST_BINARIES=test-service test-shell-service shell-test spawn-test test-segfault test-exit test-sleep-forever
16 #enable stand alone make check test
24 GCOV_BINARIES=decode-gcov
29 noinst_PROGRAMS= $(TEST_BINARIES) $(GCOV_BINARIES)
31 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 ## break_loader_LDADD= $(TEST_LIBS)
66 test_shell_service_LDADD=$(TEST_LIBS)
67 shell_test_LDADD=$(TEST_LIBS)
68 spawn_test_LDADD=$(TEST_LIBS)
69 decode_gcov_LDADD=$(TEST_LIBS)
73 ## keep these in creation order, i.e. uppermost dirs first
77 data/invalid-messages \
78 data/incomplete-messages \
81 data/valid-config-files \
82 data/valid-config-files/basic.d \
83 data/valid-config-files/system.d \
84 data/valid-service-files \
85 data/invalid-config-files \
86 data/equiv-config-files \
87 data/equiv-config-files/basic \
88 data/equiv-config-files/basic/basic.d \
89 data/equiv-config-files/entities \
90 data/equiv-config-files/entities/basic.d
93 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"
96 for D in $(TESTDIRS); do \
97 test -d $(distdir)/$$D || mkdir $(distdir)/$$D || exit 1 ; \
99 FILES=`(cd $(srcdir) && $(FIND_TESTS) -o -name "*.in" -a -not -name Makefile.in)` ; \
100 for F in $$FILES; do \
101 echo '-- Disting file '$$F ; \
102 cp -f $(srcdir)/$$F $(distdir)/$$F || exit 1 ; \
105 ## copy tests to builddir so that generated tests and static tests
106 ## are all in one place.
108 for D in $(TESTDIRS); do \
109 test -d $(top_builddir)/test/$$D || mkdir $(top_builddir)/test/$$D || exit 1 ; \
111 if ! (test $(srcdir) = . || test $(srcdir) -ef .) ; then \
112 FILES=`(cd $(srcdir) && $(FIND_TESTS))` ; \
113 for F in $$FILES; do \
114 SRC=$(srcdir)/$$F ; \
115 DEST=$(top_builddir)/test/$$F ; \
116 echo '-- Copying test file '$$F ; \
117 cp $$SRC $$DEST || exit 1 ; \
118 chmod u+w $$DEST || exit 1 ; \
121 echo '-- No need to copy test data as srcdir = builddir' ; \
123 echo '-- Copying' $(top_builddir)/bus/*.conf 'to test directory' ; \
124 cp $(top_builddir)/bus/*.conf $(top_builddir)/test/data/valid-config-files || exit 1 ; \
125 chmod u+w $(top_builddir)/test/data/valid-config-files/*.conf || exit 1
127 ## this doesn't clean generated test data files when srcdir=builddir
129 if test $(srcdir) != . ; then \
130 FILES=`(cd $(top_builddir)/test && $(FIND_TESTS))` ; \
131 for F in $$FILES; do \
132 DEST=$(top_builddir)/test/$$F ; \
133 echo '-- Deleting test file '$$F ; \
134 rm $$DEST || exit 1 ; \
137 for D in $(TESTDIRS); do \
138 REVERSEDIRS="$$D $$REVERSEDIRS" ; \
140 for D in $$REVERSEDIRS; do \
141 rmdir $(top_builddir)/test/$$D || exit 1 ; \