Refactor testing - do more with less
[platform/upstream/libgee.git] / tests / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 noinst_PROGRAMS = $(TEST_PROGS)
4
5 TEST_PROGS += tests
6
7 tests_SOURCES = \
8        testarraylist.vala \
9        testarrayqueue.vala \
10        testbidirlist.vala \
11        testbidirsortedset.vala \
12        testbidirsortedmap.vala \
13        testcase.vala \
14        testcollection.vala \
15        testconcurrentlist.vala \
16        testdata.vala \
17        testdeque.vala \
18        testfunctions.vala \
19        testhashmap.vala \
20        testhashmultimap.vala \
21        testhashmultiset.vala \
22        testhashset.vala \
23        testlinkedlist.vala \
24        testlinkedlistasdeque.vala \
25        testlist.vala \
26        testmain.vala \
27        testmap.vala \
28        testmultimap.vala \
29        testmultiset.vala \
30        testpriorityqueue.vala \
31        testqueue.vala \
32        testreadonlybidirlist.vala \
33        testreadonlycollection.vala \
34        testreadonlylist.vala \
35        testreadonlymap.vala \
36        testreadonlyset.vala \
37        testset.vala \
38        testsortedset.vala \
39        testsortedmap.vala \
40        testtreemap.vala \
41        testtreemultimap.vala \
42        testtreemultiset.vala \
43        testtreeset.vala \
44        $(NULL)
45
46 tests_DEPENDENCIES = \
47         $(top_srcdir)/gee/gee-0.8.vapi \
48         $(NULL)
49
50 tests_VALAFLAGS = \
51         --basedir $(top_srcdir) \
52         --vapidir $(top_srcdir)/gee \
53         --pkg gee-0.8 --pkg posix \
54         $(VALAFLAGS) \
55         $(NULL)
56
57 tests_CPPFLAGS = \
58         -I$(top_srcdir)/gee \
59         $(GLIB_CFLAGS) \
60         $(NULL)
61
62 tests_LDADD = \
63         $(GLIB_LIBS) ../gee/libgee-0.8.la \
64         $(NULL)
65
66 coverage-reset:
67         lcov --base-directory=@top_srcdir@ --directory @top_srcdir@/gee --zerocounters
68
69 coverage-report:
70         lcov --directory @top_srcdir@/gee \
71                 --capture \
72                 --output-file @top_builddir@/lcov.info
73
74         lcov --directory @top_srcdir@/gee \
75                 --output-file @top_builddir@/lcov.info \
76                 --remove @top_builddir@/lcov.info \
77                 "/usr/include/*" "*.c" "*.h" "*.vapi"
78
79         $(mkdir_p) @top_builddir@/tests/coverage
80         git_commit=`GIT_DIR=@top_srcdir@/.git git log -1 --pretty=format:%h 2>/dev/null`;\
81         genhtml --title "@PACKAGE_STRING@ $$git_commit" \
82                 --output-directory @top_builddir@/tests/coverage @top_builddir@/lcov.info
83         @echo
84         @echo 'lcov report can be found in:'
85         @echo 'file://@abs_top_builddir@/tests/coverage/index.html'
86         @echo
87
88 clean-local:
89         -rm -rf coverage
90
91 .PHONY: coverage-report