2 noinst_PROGRAMS = test-libevdev
4 TESTS = $(noinst_PROGRAMS)
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 \
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)
23 test_libevdev_SOURCES = \
27 test-libevdev-init.c \
28 test-libevdev-has-event.c \
30 test-libevdev-events.c \
34 test_libevdev_LDADD = $(CHECK_LIBS) $(GCOV_LDFLAGS)
38 CLEANFILES = gcov-report.txt
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))%)"; \
55 echo "========== =============== ========" >> $@; \
76 .PHONY: gcov gcov-clean gcov-report.txt
78 clean-local: gcov-clean