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