summaryrefslogtreecommitdiffstats
path: root/bus/Makefile.am
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-03-13 06:18:06 +0000
committerHavoc Pennington <hp@redhat.com>2003-03-13 06:18:06 +0000
commitd65b73884cb876276b6bd73f4b1dfcd920984a8a (patch)
tree70563d497c223c65e2d015936284c023148b5bfc /bus/Makefile.am
parent6ecc14ffabcffb69aa938a67940db48272e05046 (diff)
2003-03-13 Havoc Pennington <hp@pobox.com>
* bus/test.c, bus/test.h, bus/Makefile.am, bus/test-main.c: set up a test framework as for the library
Diffstat (limited to 'bus/Makefile.am')
-rw-r--r--bus/Makefile.am25
1 files changed, 25 insertions, 0 deletions
diff --git a/bus/Makefile.am b/bus/Makefile.am
index f9f4dbfc..f8cff917 100644
--- a/bus/Makefile.am
+++ b/bus/Makefile.am
@@ -25,6 +25,8 @@ libdbus_daemon_la_SOURCES= \
loop.h \
services.c \
services.h \
+ test.c \
+ test.h \
utils.c \
utils.h
@@ -40,3 +42,26 @@ dbus_daemon_1_LDADD= \
$(DBUS_BUS_LIBS) \
$(top_builddir)/bus/libdbus-daemon.la \
$(top_builddir)/dbus/libdbus-1.la
+
+## note that TESTS has special meaning (stuff to use in make check)
+## so if adding tests not to be run in make check, don't add them to
+## TESTS
+if DBUS_BUILD_TESTS
+TESTS_ENVIRONMENT=DBUS_TEST_DATA=$(top_srcdir)/test/data
+TESTS=bus-test
+else
+TESTS=
+endif
+
+## we use noinst_PROGRAMS not check_PROGRAMS so that we build
+## even when not doing "make check"
+noinst_PROGRAMS=$(TESTS)
+
+bus_test_SOURCES= \
+ test-main.c
+
+bus_test_LDADD= $(top_builddir)/dbus/libdbus-convenience.la libdbus-daemon.la
+
+## mop up the gcov files
+clean-local:
+ /bin/rm *.bb *.bbg *.da *.gcov || true