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