diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-11 13:47:01 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-11 13:47:01 -0700 |
commit | e785dadc90df20e1038c053dc168a6458b1e672b (patch) | |
tree | 5c147998a1030a06155e64686229929db8fe1776 /Makefile | |
parent | 7d59ceed9d1e4f8f0dc52cebf55219d6d395c9da (diff) | |
parent | b26d8d217d8d960cbd9ed1dbf6b3cccfd1a3a4db (diff) | |
download | git-e785dadc90df20e1038c053dc168a6458b1e672b.tar.gz git-e785dadc90df20e1038c053dc168a6458b1e672b.tar.xz |
Merge branch 'tr/gcov'
* tr/gcov:
Test git-patch-id
Test rev-list --parents/--children
Test log --decorate
Test fsck a bit harder
Test log --graph
Test diff --dirstat functionality
Test that diff can read from stdin
Support coverage testing with GCC/gcov
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -1640,3 +1640,27 @@ check-docs:: check-builtins:: ./check-builtins.sh +### Test suite coverage testing +# +.PHONY: coverage coverage-clean coverage-build coverage-report + +coverage: + $(MAKE) coverage-build + $(MAKE) coverage-report + +coverage-clean: + rm -f *.gcda *.gcno + +COVERAGE_CFLAGS = $(CFLAGS) -O0 -ftest-coverage -fprofile-arcs +COVERAGE_LDFLAGS = $(CFLAGS) -O0 -lgcov + +coverage-build: coverage-clean + $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" all + $(MAKE) CFLAGS="$(COVERAGE_CFLAGS)" LDFLAGS="$(COVERAGE_LDFLAGS)" \ + -j1 test + +coverage-report: + gcov -b *.c + grep '^function.*called 0 ' *.c.gcov \ + | sed -e 's/\([^:]*\)\.gcov: *function \([^ ]*\) called.*/\1: \2/' \ + | tee coverage-untested-functions |