1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
|
include $(top_srcdir)/Makefile.decl
INCLUDES = \
-I$(top_srcdir)/src -I$(top_builddir)/src \
$(GIO_UNIX_CFLAGS) \
$(ZEITGEIST_CFLAGS)
AM_CFLAGS = \
-Wall \
-g \
-DZEITGEIST_COMPILATION \
-DTEST_DIR=\"$(top_srcdir)/tests\"
zeitgeist_libs = $(top_builddir)/src/libzeitgeist-1.0.la $(ZEITGEIST_LIBS)
EXTRA_DIST += \
test.desktop
helper_sources = \
$(top_srcdir)/src/zeitgeist-mimetypes.c \
$(top_srcdir)/src/zeitgeist-mimetypes.h \
test.desktop
noinst_PROGRAMS = $(TEST_PROGS)
TEST_PROGS += test-timerange
test_timerange_SOURCES = test-timerange.c $(helper_sources)
test_timerange_LDADD = $(zeitgeist_libs)
TEST_PROGS += test-timestamp
test_timestamp_SOURCES = test-timestamp.c $(helper_sources)
test_timestamp_LDADD = $(zeitgeist_libs)
TEST_PROGS += test-symbols
test_symbols_SOURCES = test-symbols.c $(helper_sources)
test_symbols_LDADD = $(zeitgeist_libs)
TEST_PROGS += test-monitor
test_monitor_SOURCES = test-monitor.c $(helper_sources)
test_monitor_LDADD = $(zeitgeist_libs)
TEST_PROGS += test-log
test_log_SOURCES = test-log.c $(helper_sources)
test_log_LDADD = $(zeitgeist_libs)
TEST_PROGS += test-event
test_event_SOURCES = test-event.c $(helper_sources)
test_event_LDADD = $(zeitgeist_libs) $(GIO_UNIX_LIBS)
TEST_PROGS += test-datasource
test_datasource_SOURCES = test-datasource.c $(helper_sources)
test_datasource_LDADD = $(zeitgeist_libs) $(GIO_UNIX_LIBS)
TEST_PROGS += test-mimetypes
test_mimetypes_SOURCES = test-mimetypes.c $(helper_sources)
test_mimetypes_LDADD = $(zeitgeist_libs)
# HEADLESS CHECKS
# Start up a new Zeitgeist on a private bus using only a
# memory backed log database. We also need a fake X server
# because dbus-launch requires an X server...
check-headless:
export ZEITGEIST_DATABASE_PATH=":memory:"; \
export DISPLAY=":1"; \
Xvfb :1 -screen 0 1024x768x8 & \
dbus-launch > _sessionbus.sh; \
source _sessionbus.sh; \
cat _sessionbus.sh; \
zeitgeist-daemon --quit; \
zeitgeist-daemon --no-datahub & \
make check; \
zeitgeist-daemon --quit; \
kill `grep DBUS_SESSION_BUS_PID _sessionbus.sh | grep -oE '[0-9]+'`; \
pkill Xvfb; \
rm _sessionbus.sh
|