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