summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
blob: b9159abeac9940b20c576743df3ede67a1aeff8f (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
SUBDIRS = \
    . \
    lib \
    dbus \
    tools

noinst_PROGRAMS = \
    test-asv \
    test-availability-cmp \
    test-heap \
    test-internal-debug \
    test-intset \
    test-util \
    test-debug-domain

TESTS = $(noinst_PROGRAMS) \
    all-errors-documented.py

TESTS_ENVIRONMENT = \
    abs_top_builddir=@abs_top_builddir@ \
    abs_top_srcdir=@abs_top_srcdir@ \
    G_DEBUG=fatal_warnings,fatal_criticals \
    PYTHONPATH=@abs_top_srcdir@/tools

VALGRIND_TESTS_ENVIRONMENT = \
    G_SLICE=always-malloc \
    $(TESTS_ENVIRONMENT) \
    $(top_builddir)/libtool --mode=execute \
    valgrind --tool=memcheck --leak-check=full --show-reachable=yes \
        --suppressions=$(top_srcdir)/examples/tp-glib-examples.supp \
        --child-silent-after-fork=yes --num-callers=20 --error-exitcode=42 \
        --gen-suppressions=all \
        $(VALGRIND_FLAGS)

check-valgrind:
	$(MAKE) check-TESTS \
		TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)"
	$(MAKE) -C dbus check-valgrind

EXTRA_DIST = README \
    all-errors-documented.py

test_asv_SOURCES = \
    asv.c

test_heap_SOURCES = \
    heap.c

test_util_SOURCES = \
    util.c

test_intset_SOURCES = \
    intset.c

test_availability_cmp_SOURCES = \
    availability-cmp.c

test_debug_domain_SOURCES = \
    debug-domain.c

test_internal_debug_SOURCES = \
    internal-debug.c

# this needs to link against the static convenience library so that
# _tp_debug is still visible
test_debug_domain_LDADD = \
    $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la
test_internal_debug_LDADD = \
    $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la

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

LDADD = \
    $(top_builddir)/telepathy-glib/libtelepathy-glib.la \
    $(GLIB_LIBS)

AM_CFLAGS = \
    $(ERROR_CFLAGS) \
    $(DBUS_CFLAGS) \
    $(GLIB_CFLAGS) \
    $(TP_GLIB_CFLAGS)