]> git.0d.be Git - empathy.git/blob - tests/Makefile.am
port check-empathy-chatroom-manager.c to GTest
[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      empathy-irc-server-test                     \
29      empathy-irc-network-test                    \
30      empathy-irc-network-manager-test            \
31      empathy-chatroom-test                       \
32      empathy-chatroom-manager-test
33
34 empathy_utils_test_SOURCES = empathy-utils-test.c \
35      test-helper.c test-helper.h
36
37 empathy_irc_server_test_SOURCES = empathy-irc-server-test.c \
38      test-helper.c test-helper.h                       \
39      check-irc-helper.h check-irc-helper.c
40
41 empathy_irc_network_test_SOURCES = empathy-irc-network-test.c \
42      test-helper.c test-helper.h                       \
43      check-irc-helper.h check-irc-helper.c
44
45 empathy_irc_network_manager_test_SOURCES = empathy-irc-network-manager-test.c \
46      test-helper.c test-helper.h                       \
47      check-irc-helper.h check-irc-helper.c             \
48      check-empathy-helpers.h check-empathy-helpers.c
49
50 empathy_chatroom_test_SOURCES = empathy-chatroom-test.c \
51      test-helper.c test-helper.h
52
53 empathy_chatroom_manager_test_SOURCES = empathy-chatroom-manager-test.c \
54      test-helper.c test-helper.h
55
56 check_PROGRAMS = check-main $(TEST_PROGS)
57
58 TESTS = check-main
59 check_main_SOURCES =                             \
60     check-main.c                                 \
61     check-helpers.c                              \
62     check-helpers.h                              \
63     check-libempathy.h                           \
64     check-empathy-helpers.h                      \
65     check-empathy-helpers.c                      \
66     check-irc-helper.h                           \
67     check-irc-helper.c
68
69 check_c_sources = \
70     $(check_main_SOURCES)
71 include $(top_srcdir)/tools/check-coding-style.mk
72 check-local: test check-coding-style
73
74 check_main_LDADD = \
75     @CHECK_LIBS@ \
76     $(top_builddir)/libempathy-gtk/libempathy-gtk.la    \
77     $(top_builddir)/libempathy/libempathy.la            \
78     $(AM_LDFLAGS)
79
80 check_main_CFLAGS = \
81     @CHECK_CFLAGS@ \
82     $(AM_CFLAGS)
83
84 TESTS_ENVIRONMENT = EMPATHY_SRCDIR=@abs_top_srcdir@ \
85                     MC_PROFILE_DIR=@abs_top_srcdir@/tests \
86                     MC_MANAGER_DIR=@abs_top_srcdir@/tests
87
88 test-report: test-report.xml
89         gtester-report $(top_builddir)/tests/$@.xml > \
90           $(top_builddir)/tests/$@.html
91
92 test-report.xml: ${TEST_PROGS} test
93
94 test: ${TEST_PROGS}
95         gtester -o test-report.xml -k --verbose ${TEST_PROGS}
96
97 test-%: empathy-%-test
98         gtester -o $@-report.xml -k --verbose $<
99
100 .PHONY: test test-report