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-uinput.h \
9 $(top_srcdir)/libevdev/libevdev-uinput.c \
10 $(top_srcdir)/libevdev/libevdev-uinput-int.h \
11 $(top_srcdir)/libevdev/libevdev-util.h \
12 $(top_srcdir)/libevdev/libevdev-int.h
13 common_sources = $(libevdev_sources) \
14 test-common-uinput.c \
15 test-common-uinput.h \
19 # include builddir for event-names.h
20 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_builddir)/libevdev $(CHECK_CFLAGS) $(GCOV_CFLAGS)
22 test_libevdev_SOURCES = \
25 test-libevdev-init.c \
26 test-libevdev-has-event.c \
28 test-libevdev-events.c \
32 test_libevdev_LDADD = $(CHECK_LIBS) $(GCOV_LDFLAGS)
36 CLEANFILES = gcov-report.txt
41 gcov-report.txt: gcov-clean check-TESTS
42 $(AM_V_GEN)(rm -rf $@; \
43 echo "========== coverage report ========" >> $@; \
44 for file in `find $(top_srcdir)/libevdev -name "*.c" -printf "%P\n"`; do \
45 gcov $$file > /dev/null; \
46 if test -f $$file.gcov; then \
47 total=`grep -v " -:" $$file.gcov | wc -l`; \
48 missing=`grep "#####" $$file.gcov | wc -l`; \
49 hit=$$((total - missing)); \
50 echo -e "$$file: total lines: $$total not tested: $$missing ($$((($$hit * 100)/$$total))%)"; \
53 echo "========== =============== ========" >> $@; \
74 .PHONY: gcov gcov-clean gcov-report.txt
76 clean-local: gcov-clean