Refactor the Set implementations' tests
[platform/upstream/libgee.git] / tests / Makefile.am
1 include $(top_srcdir)/Makefile.decl
2
3 NULL =
4
5 AM_CPPFLAGS = \
6         -I$(top_srcdir)/gee \
7         $(GLIB_CFLAGS) \
8         $(NULL)
9
10 noinst_PROGRAMS = $(TEST_PROGS)
11
12 progs_ldadd = $(GLIB_LIBS) ../gee/libgee.la
13
14 BUILT_SOURCES = tests.vala.stamp
15
16 TEST_PROGS += tests
17 tests_VALASOURCES = \
18        testarraylist.vala \
19        testcase.vala \
20        testcollection.vala \
21        testdeque.vala \
22        testhashmap.vala \
23        testhashmultimap.vala \
24        testhashmultiset.vala \
25        testhashset.vala \
26        testlinkedlist.vala \
27        testlinkedlistasdeque.vala \
28        testlist.vala \
29        testmain.vala \
30        testmap.vala \
31        testmultimap.vala \
32        testmultiset.vala \
33        testpriorityqueue.vala \
34        testqueue.vala \
35        testreadonlycollection.vala \
36        testreadonlylist.vala \
37        testset.vala \
38        testtreemap.vala \
39        testtreeset.vala \
40        $(NULL)
41
42 tests_SOURCES = tests.vala.stamp $(tests_VALASOURCES:.vala=.c)
43 tests.vala.stamp: $(tests_VALASOURCES)
44         $(VALAC) -C --basedir $(top_srcdir) --vapidir $(top_srcdir)/gee --pkg gee-1.0 $^
45         touch $@
46 tests_LDADD = $(progs_ldadd)
47 EXTRA_DIST += $(tests_VALASOURCES)
48
49 coverage-reset:
50         lcov --base-directory=@top_srcdir@ --directory @top_srcdir@/gee --zerocounters
51
52 coverage-report:
53         lcov --directory @top_srcdir@/gee \
54                 --capture \
55                 --output-file @top_builddir@/lcov.info
56
57         lcov --directory @top_srcdir@/gee \
58                 --output-file @top_builddir@/lcov.info \
59                 --remove @top_builddir@/lcov.info \
60                 /usr/include/\*
61
62         $(mkdir_p) @top_builddir@/tests/coverage
63         git_commit=`GIT_DIR=@top_srcdir@/.git git log -1 --pretty=format:%h 2>/dev/null`;\
64         genhtml --title "@PACKAGE_STRING@ $$git_commit" \
65                 --output-directory @top_builddir@/tests/coverage @top_builddir@/lcov.info
66         @echo
67         @echo 'lcov report can be found in:'
68         @echo 'file://@abs_top_builddir@/tests/coverage/index.html'
69         @echo
70
71 clean-local:
72         -rm -rf coverage
73
74 .PHONY: coverage-report