diff options
author | John Coggeshall <john@php.net> | 2005-10-20 00:18:23 +0000 |
---|---|---|
committer | John Coggeshall <john@php.net> | 2005-10-20 00:18:23 +0000 |
commit | 5259aa2943f9e0dbfccdb07836b2dffa6c77d4d6 (patch) | |
tree | 8155ebee7e2f1fed9a190bda06812d5807cebf91 /Makefile.gcov | |
parent | 222fa05e1c6299b672d84bf73ffea282d6ddd26f (diff) | |
download | php-git-5259aa2943f9e0dbfccdb07836b2dffa6c77d4d6.tar.gz |
Implementing C-level Code coverage (--enable-gcov).
o Requires LTP 1.4+ and libgcov
Diffstat (limited to 'Makefile.gcov')
-rw-r--r-- | Makefile.gcov | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Makefile.gcov b/Makefile.gcov new file mode 100644 index 0000000000..80ce36da3f --- /dev/null +++ b/Makefile.gcov @@ -0,0 +1,18 @@ + +.php_cov_info.ltpdata: + @mkdir -p .cov/; \ + find . -name \*.gcda -o -name \*.gcno | sed -e 's/^\.\/\.cov\/.*//' | xargs --replace cp {} .cov/; \ + find . -name \*.gcda -o -name \*.gcno | sed -e 's/^\.\/\.cov\/.*//' | sed -e 's/^\.\///' | xargs --max-args=1 dirname | sed -e 's/\/.*//' | xargs --replace ln -s `pwd`/{} `pwd`/.cov > /dev/null 2>&1; \ + $(LTP) --directory .cov --output-file=.php_cov_info.ltpdata --capture; \ + +cov: .php_cov_info.ltpdata + +cov-html: cov + @$(LTP_GENHTML) -o cov_html/ .php_cov_info.ltpdata -t "PHP Code Coverage" -s; + +cov-clean: + find . -name \*.gcda -o -name \*.gcno -exec rm -f {} \; + rm -f .cov/* # This is done first, since we are symlinked inside.. + rm -Rf .cov # Now remove the directory + rm -f .php_cov_info.ltpdata + rm -Rf cov_html |