2 INCLUDES=-I$(top_srcdir) $(DBUS_TEST_CFLAGS)
5 TEST_BINARIES=test-service unbase64 break-loader spawn-test test-segfault test-exit test-sleep-forever
11 GCOV_BINARIES=decode-gcov
16 noinst_PROGRAMS= $(TEST_BINARIES) $(GCOV_BINARIES)
18 test_service_SOURCES= \
26 break_loader_SOURCES= \
35 test_segfault_SOURCES = \
38 test_sleep_forever_SOURCES = \
41 decode_gcov_SOURCES= \
44 TEST_LIBS=$(DBUS_TEST_LIBS) $(top_builddir)/dbus/libdbus-convenience.la
46 test_service_LDADD=$(TEST_LIBS)
47 unbase64_LDADD=$(TEST_LIBS)
48 break_loader_LDADD= $(TEST_LIBS)
49 spawn_test_LDADD=$(TEST_LIBS)
50 decode_gcov_LDADD=$(TEST_LIBS)
54 ## keep these in creation order, i.e. uppermost dirs first
58 data/invalid-messages \
59 data/incomplete-messages \
62 data/valid-config-files \
63 data/valid-config-files/basic.d \
64 data/valid-config-files/system.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=`(cd $(srcdir) && $(FIND_TESTS) -o -name "*.in" -a -not -name Makefile.in)` ; \
74 for F in $$FILES; do \
75 echo '-- Disting file '$$F ; \
76 cp $(srcdir)/$$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 ; \