summaryrefslogtreecommitdiff
path: root/tests/dbus/Makefile.am
blob: e0a8805636a7167fbb14817cd99b960733f65555 (plain)
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
76
77
78
79
80
81
82
83
84
noinst_PROGRAMS = \
	test-entity 			\
	test-log-manager		\
	test-tpl-log-store-pidgin 	\
	test-tpl-log-iter-pidgin	\
	test-tpl-log-store-sqlite	\
	test-tpl-log-store-xml 		\
	test-tpl-log-iter-xml		\
	test-tpl-log-walker		\
	test-tpl-observer		\
	$(NULL)

TESTS = $(noinst_PROGRAMS)

LDADD = \
	$(top_builddir)/tests/lib/libtp-logger-tests.la		\
	$(top_builddir)/telepathy-logger/libtelepathy-logger.la	\
	$(TPL_LIBS) 						\
	$(NULL)

test_entity_LDADD = \
	$(top_builddir)/tests/lib/libtp-logger-tests.la \
	$(LDADD) \
	$(NULL)

check_c_sources = *.c
include $(top_srcdir)/tools/check-coding-style.mk
check-local: check-coding-style

AM_CFLAGS = \
	$(ERROR_CFLAGS) \
	$(TPL_CFLAGS) \
	-I$(top_srcdir) \
	-I$(top_builddir) \
	-I$(top_srcdir)/tests
	$(NULL)

TESTS_ENVIRONMENT = \
    abs_top_builddir=@abs_top_builddir@				\
    TPL_TEST_MODE=true						\
    TPL_TEST_LOG_DIR=@abs_top_srcdir@/tests/logs		\
    GSETTINGS_SCHEMA_DIR=@abs_srcdir@/data			\
    XDG_DATA_HOME=@abs_top_builddir@/tests/logs			\
    XDG_DATA_DIRS=@abs_srcdir@					\
    G_SLICE=debug-blocks					\
    TPL_DEBUG=all						\
    G_DEBUG=fatal_warnings,fatal_criticals$(maybe_gc_friendly)	\
    $(top_srcdir)/tools/test-wrapper.sh				\
    sh $(top_srcdir)/tools/with-session-bus.sh			\
        --config-file=dbus-1/session.conf --			\
    $(EXTRA_TESTS_ENVIRONMENT)

EXTRA_TESTS_ENVIRONMENT =

check-valgrind:
	$(MAKE) check-TESTS \
		maybe_gc_friendly=,gc-friendly \
		TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)"

include $(top_srcdir)/tools/valgrind.mk

VALGRIND_TESTS_ENVIRONMENT = \
    $(TESTS_ENVIRONMENT)			\
    env G_SLICE=always-malloc CHECK_VERBOSE=1	\
    $(top_builddir)/libtool --mode=execute	\
    $(VALGRIND) --suppressions=$(top_srcdir)/tests/suppressions/tpl.supp $(VALGRIND_FLAGS)

BUILT_SOURCES = \
	dbus-1/session.conf \
	$(NULL)

CLEANFILES = $(BUILT_SOURCES)

distclean-local:
	rm -f capture-*.log
	rm -rf _gen

EXTRA_DIST = \
    dbus-1/session.conf.in 	\
    $(NULL)

dbus-1/%.conf: $(srcdir)/dbus-1/%.conf.in
	$(AM_V_at)$(MKDIR_P) dbus-1
	$(AM_V_GEN)sed -e "s|[@]abs_top_builddir[@]|@abs_top_builddir@|g" $< > $@