1SUBDIRS = \ 2 lib \ 3 . \ 4 dbus \ 5 tools 6 7programs_list = \ 8 test-asv \ 9 test-capabilities \ 10 test-availability-cmp \ 11 test-dtmf-player \ 12 test-enums \ 13 test-gnio-util \ 14 test-heap \ 15 test-internal-debug \ 16 test-intset \ 17 test-message \ 18 test-signal-connect-object \ 19 test-util \ 20 test-debug-domain \ 21 test-contact-search-result \ 22 $(NULL) 23 24if HAVE_CXX 25programs_list += \ 26 test-util-cxx 27endif 28 29if ENABLE_INSTALLED_TESTS 30testsdir = @tpglibtestsdir@ 31tests_PROGRAMS = $(programs_list) 32tests_DATA = tpglib-tests.list 33else 34noinst_PROGRAMS = $(programs_list) 35endif 36 37tpglib-tests.list: 38 $(AM_V_GEN)echo $(programs_list) > $@ 39 40TESTS = $(programs_list) \ 41 all-errors-documented.py 42 43TESTS_ENVIRONMENT = \ 44 abs_top_builddir=@abs_top_builddir@ \ 45 abs_top_srcdir=@abs_top_srcdir@ \ 46 G_SLICE=debug-blocks \ 47 G_DEBUG=fatal_warnings,fatal_criticals$(maybe_gc_friendly) \ 48 G_MESSAGES_DEBUG=all \ 49 PYTHONPATH=@abs_top_srcdir@/tools \ 50 $(top_srcdir)/tools/test-wrapper.sh \ 51 $(EXTRA_TESTS_ENVIRONMENT) 52 53EXTRA_TESTS_ENVIRONMENT = 54 55include $(top_srcdir)/tools/valgrind.mk 56 57VALGRIND_TESTS_ENVIRONMENT = \ 58 $(TESTS_ENVIRONMENT) \ 59 env G_SLICE=always-malloc CHECK_VERBOSE=1 \ 60 $(top_builddir)/libtool --mode=execute \ 61 $(VALGRIND) --suppressions=$(top_srcdir)/tests/tests.supp $(VALGRIND_FLAGS) 62 63check-valgrind: 64 $(MAKE) check-TESTS \ 65 maybe_gc_friendly=,gc-friendly \ 66 TESTS='$$(programs_list)' \ 67 TESTS_ENVIRONMENT="$(VALGRIND_TESTS_ENVIRONMENT)" 68 $(MAKE) -C dbus check-valgrind 69 70EXTRA_DIST = README \ 71 all-errors-documented.py \ 72 tests.supp 73 74# this one uses internal ABI 75test_asv_SOURCES = \ 76 asv.c 77test_asv_LDADD = \ 78 $(top_builddir)/tests/lib/libtp-glib-tests-internal.la \ 79 $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la \ 80 $(GLIB_LIBS) 81 82# this one uses internal ABI 83test_capabilities_SOURCES = \ 84 capabilities.c 85test_capabilities_LDADD = \ 86 $(top_builddir)/tests/lib/libtp-glib-tests-internal.la \ 87 $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la \ 88 $(GLIB_LIBS) 89 90# this one uses internal ABI 91test_contact_search_result_SOURCES = \ 92 contact-search-result.c 93test_contact_search_result_LDADD = \ 94 $(top_builddir)/tests/lib/libtp-glib-tests-internal.la \ 95 $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la \ 96 $(GLIB_LIBS) 97 98test_dtmf_player_SOURCES = dtmf-player.c 99test_dtmf_player_LDADD = \ 100 $(top_builddir)/tests/lib/libtp-glib-tests.la \ 101 $(LDADD) 102 103test_heap_SOURCES = \ 104 heap.c 105 106test_gnio_util_SOURCES = \ 107 gnio-util.c 108 109test_util_SOURCES = \ 110 util.c 111 112test_intset_SOURCES = \ 113 intset.c 114 115test_availability_cmp_SOURCES = \ 116 availability-cmp.c 117 118test_enums_SOURCES = \ 119 enums.c 120 121test_debug_domain_SOURCES = \ 122 debug-domain.c 123 124test_internal_debug_SOURCES = \ 125 internal-debug.c 126 127test_message_SOURCES = \ 128 message.c 129test_message_LDADD = \ 130 $(top_builddir)/tests/lib/libtp-glib-tests.la \ 131 $(LDADD) 132 133test_signal_connect_object_SOURCES = \ 134 signal-connect-object.c 135test_signal_connect_object_LDADD = \ 136 $(top_builddir)/tests/lib/libtp-glib-tests.la \ 137 $(LDADD) 138 139# this needs to link against the static convenience library so that 140# _tp_log is still visible 141test_debug_domain_LDADD = \ 142 $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la 143test_internal_debug_LDADD = \ 144 $(top_builddir)/telepathy-glib/libtelepathy-glib-internal.la 145 146check_c_sources = *.c 147include $(top_srcdir)/tools/check-coding-style.mk 148check-local: check-coding-style 149 150LDADD = \ 151 $(top_builddir)/telepathy-glib/libtelepathy-glib.la \ 152 $(GLIB_LIBS) \ 153 $(DBUS_LIBS) \ 154 $(NULL) 155 156AM_CPPFLAGS = \ 157 -I${top_srcdir} -I${top_builddir} \ 158 -D_TP_COMPILATION \ 159 -D_TP_IGNORE_DEPRECATIONS \ 160 $(GLIB_CFLAGS) \ 161 $(DBUS_CFLAGS) \ 162 $(NULL) 163AM_LDFLAGS = \ 164 $(ERROR_LDFLAGS) \ 165 $(NULL) 166 167AM_CFLAGS = $(ERROR_CFLAGS) 168AM_CXXFLAGS = $(ERROR_CXXFLAGS) 169 170if HAVE_CXX 171test_util_cxx_SOURCES = util-cxx.cpp 172endif 173