]> git.0d.be Git - empathy.git/blob - tests/Makefile.am
21ee99bf8289fb9b613de0b1dee2ad5e757da2c3
[empathy.git] / tests / Makefile.am
1 SUBDIRS = interactive xml
2
3 CLEANFILES=
4
5 include $(top_srcdir)/rules/check.mak
6
7 SUPPRESSIONS=valgrind.supp dlopen.supp
8
9 EXTRA_DIST =            \
10         test.manager    \
11         test.profile
12
13 AM_CPPFLAGS =                                           \
14         $(ERROR_CFLAGS)                                 \
15         -I$(top_srcdir)                                 \
16         -DPKGDATADIR=\""$(pkgdatadir)"\"                \
17         $(EMPATHY_CFLAGS)                               \
18         $(WARN_CFLAGS)                                  \
19         $(DISABLE_DEPRECATED)
20
21 LDADD =                                                         \
22         $(top_builddir)/libempathy-gtk/libempathy-gtk.la        \
23         $(top_builddir)/libempathy/libempathy.la                \
24         $(EMPATHY_LIBS)
25
26 TEST_PROGS =                                     \
27      empathy-utils-test
28
29 empathy_utils_test_SOURCES = empathy-utils-test.c
30
31 check_PROGRAMS = check-main $(TEST_PROGS)
32
33 TESTS = check-main
34 check_main_SOURCES =                             \
35     check-main.c                                 \
36     check-helpers.c                              \
37     check-helpers.h                              \
38     check-libempathy.h                           \
39     check-empathy-helpers.h                      \
40     check-empathy-helpers.c                      \
41     check-irc-helper.h                           \
42     check-irc-helper.c                           \
43     check-empathy-irc-server.c                   \
44     check-empathy-irc-network.c                  \
45     check-empathy-irc-network-manager.c          \
46     check-empathy-chatroom.c                     \
47     check-empathy-chatroom-manager.c
48
49 check_c_sources = \
50     $(check_main_SOURCES)
51 include $(top_srcdir)/tools/check-coding-style.mk
52 check-local: test check-coding-style
53
54 check_main_LDADD = \
55     @CHECK_LIBS@ \
56     $(top_builddir)/libempathy-gtk/libempathy-gtk.la    \
57     $(top_builddir)/libempathy/libempathy.la            \
58     $(AM_LDFLAGS)
59
60 check_main_CFLAGS = \
61     @CHECK_CFLAGS@ \
62     $(AM_CFLAGS)
63
64 TESTS_ENVIRONMENT = EMPATHY_SRCDIR=@abs_top_srcdir@ \
65                     MC_PROFILE_DIR=@abs_top_srcdir@/tests \
66                     MC_MANAGER_DIR=@abs_top_srcdir@/tests
67
68 test-report: test-report.xml
69         gtester-report $(top_builddir)/tests/$@.xml > \
70           $(top_builddir)/tests/$@.html
71
72 test-report.xml: ${TEST_PROGS} test
73
74 test: ${TEST_PROGS}
75         gtester -o test-report.xml -k --verbose ${TEST_PROGS}
76
77 test-%: empathy-%-test
78         gtester -o $@-report.xml -k --verbose $<
79
80 .PHONY: test test-report