Drop semicolons after getter/setter macros
[platform/upstream/libevdev.git] / test / Makefile.am
1 if BUILD_TESTS
2 noinst_PROGRAMS = test-libevdev
3
4 TESTS = $(noinst_PROGRAMS)
5
6 libevdev_sources = $(top_srcdir)/libevdev/libevdev.c \
7                    $(top_srcdir)/libevdev/libevdev.h \
8                    $(top_srcdir)/libevdev/libevdev-names.c \
9                    $(top_srcdir)/libevdev/libevdev-uinput.h \
10                    $(top_srcdir)/libevdev/libevdev-uinput.c \
11                    $(top_srcdir)/libevdev/libevdev-uinput-int.h \
12                    $(top_srcdir)/libevdev/libevdev-util.h \
13                    $(top_srcdir)/libevdev/libevdev-int.h
14 common_sources = $(libevdev_sources) \
15                  test-common-uinput.c \
16                  test-common-uinput.h \
17                  test-common.c \
18                  test-common.h
19
20 # include builddir for event-names.h
21 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/libevdev $(CHECK_CFLAGS) $(GCOV_CFLAGS)
22
23 test_libevdev_SOURCES = \
24                         test-main.c \
25                         test-event-names.c \
26                         test-event-codes.c \
27                         test-libevdev-init.c \
28                         test-libevdev-has-event.c \
29                         test-int-queue.c \
30                         test-libevdev-events.c \
31                         test-uinput.c \
32                         $(common_sources)
33
34 test_libevdev_LDADD =  $(CHECK_LIBS) $(GCOV_LDFLAGS)
35
36 if GCOV_ENABLED
37
38 CLEANFILES = gcov-report.txt
39
40 gcov-clean:
41         @rm -f *.gcov
42
43 gcov-report.txt: gcov-clean check-TESTS
44         $(AM_V_GEN)(rm -rf $@; \
45                 echo "========== coverage report ========" >> $@; \
46                 for file in `find $(top_srcdir)/libevdev -name "*.c" -printf "%P\n"`; do \
47                         gcov $$file > /dev/null; \
48                         if test -f $$file.gcov; then \
49                                 total=`grep -v " -:" $$file.gcov | wc -l`; \
50                                 missing=`grep "#####" $$file.gcov | wc -l`; \
51                                 hit=$$((total - missing)); \
52                                 echo -e "$$file: total lines: $$total not tested: $$missing ($$((($$hit * 100)/$$total))%)"; \
53                         fi \
54                 done >> $@; \
55                 echo "========== =============== ========" >> $@; \
56         )
57
58 gcov: gcov-report.txt
59         @cat gcov-report.txt
60
61 check-local: gcov
62
63 else
64
65 gcov-report.txt:
66         @true
67
68 gcov:
69         @true
70
71 gcov-clean:
72         @true
73
74 endif
75
76 .PHONY: gcov gcov-clean gcov-report.txt
77
78 clean-local: gcov-clean
79         rm -f *.gcno *.gcda
80
81 endif