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