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