Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 78 lines (72 sloc) 3.085 kb
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
1
2 #
3 # LCOV
4 #
5
6 lcov: lcov-html
7
8 lcov-test: all
9 @echo "Running test suite"
de8052aa » foobar
2005-11-30 MFH
10 @find . -name \*.gcda -o -name \*.da -o -name \*.bbg? | xargs rm -f
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
11 -@if test ! -z "$(PHP_EXECUTABLE)" && test -x "$(PHP_EXECUTABLE)"; then \
12 NO_INTERACTION=1 \
13 TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
14 TEST_PHP_SRCDIR=$(top_srcdir) \
15 CC="$(CC)" \
16 $(PHP_EXECUTABLE) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php -d 'extension_dir=modules/' -d `( . $(PHP_MODULES) ; echo extension=$$dlname)` tests/; \
17 elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
18 NO_INTERACTION=1 \
19 TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
20 TEST_PHP_SRCDIR=$(top_srcdir) \
21 CC="$(CC)" \
22 $(top_builddir)/$(SAPI_CLI_PATH) -d 'open_basedir=' -d 'safe_mode=0' -d 'output_buffering=0' -d 'memory_limit=-1' $(top_srcdir)/run-tests.php $(TESTS); \
23 else \
24 echo "ERROR: Cannot run tests without CLI sapi."; \
25 fi
26
27 php_lcov.info: lcov-test
28 @echo "Generating data for $@"
29 @rm -rf lcov_data/
30 @$(mkinstalldirs) lcov_data/
31 @echo
618e6232 » Nuno Lopes
2006-09-10 fix lcov processing with gcc 4.1 (some .h files were not copied)
32 -@find . -name \*.gcda -o -name \*.gcno -o -name \*.da -o -name \*.h | sed -e 's/^\.\///' | sed -e 's/\.gcda//g' -e 's/\.gcno//g' -e 's/\.da//g' | uniq | while read x; do \
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
33 echo -n . ;\
b01f5b35 » Ilia Alshanetsky
2005-12-04 Fixed gcov for generated files
34 y=`echo $$x | sed -e 's!\.libs/!!'`; \
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
35 dir=lcov_data/`dirname $$x`; \
36 test -d "$$dir" || $(mkinstalldirs) "$$dir"; \
b01f5b35 » Ilia Alshanetsky
2005-12-04 Fixed gcov for generated files
37 if test -f "$(top_srcdir)/$$y.c"; then \
38 ln -f -s $(top_srcdir)/$$y.c lcov_data/$$y.c; \
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
39 fi; \
50cc487b » rlerdorf
2006-06-09 MFH: Patch from Nuno
40 if test -f "$(top_srcdir)/$$y.h"; then \
41 ln -f -s $(top_srcdir)/$$y.h lcov_data/$$y.h; \
42 fi; \
b01f5b35 » Ilia Alshanetsky
2005-12-04 Fixed gcov for generated files
43 if test -f "$(top_srcdir)/$$y.re"; then \
44 ln -f -s $(top_srcdir)/$$y.re lcov_data/$$y.re; \
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
45 fi; \
b01f5b35 » Ilia Alshanetsky
2005-12-04 Fixed gcov for generated files
46 if test -f "$(top_srcdir)/$$y.y"; then \
47 ln -f -s $(top_srcdir)/$$y.y lcov_data/$$y.y; \
de8052aa » foobar
2005-11-30 MFH
48 fi; \
b01f5b35 » Ilia Alshanetsky
2005-12-04 Fixed gcov for generated files
49 if test -f "$(top_srcdir)/$$y.l"; then \
50 ln -f -s $(top_srcdir)/$$y.l lcov_data/$$y.l; \
de8052aa » foobar
2005-11-30 MFH
51 fi; \
618e6232 » Nuno Lopes
2006-09-10 fix lcov processing with gcc 4.1 (some .h files were not copied)
52 if test -f "$(top_srcdir)/$$y"; then \
53 ln -f -s $(top_srcdir)/$$y lcov_data/$$y; \
54 fi; \
b01f5b35 » Ilia Alshanetsky
2005-12-04 Fixed gcov for generated files
55 if test -f "$(top_builddir)/$$y.c"; then \
56 ln -f -s $(top_builddir)/$$y.c lcov_data/$$y.c; \
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
57 fi; \
6abf54a4 » Ilia Alshanetsky
2005-12-05 Avoid gcov conflicts on non-unique filenames
58 test -f "$$x.gcno" && cp $$x.gcno lcov_data/$$y.gcno ; \
59 test -f "$$x.gcda" && cp $$x.gcda lcov_data/$$y.gcda ; \
60 test -f "$$x.da" && cp $$x.da lcov_data/$$y.da ; \
61 test -f "$$x.bb" && cp $$x.bb lcov_data/$$y.bb ; \
62 test -f "$$x.bbg" && cp $$x.bbg lcov_data/$$y.bbg ; \
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
63 done
97417927 » Marcus Boerger
2008-08-03 - MFH Drop libsqlite even here
64 for dir in ext/bcmath/libbcmath ext/date/lib ext/fileinfo/libmagic ext/gd/libgd ext/mbstring/libmbfl ext/mbstring/oniguruma ext/pcre/pcrelib ext/pdo_sqlite/libsqlite ext/sqlite/libsqlite ext/sqlite3/libsqlite ext/xmlrpc/libxmlrpc ext/zip/lib; do \
a487c8b9 » Marcus Boerger
2008-07-29 - MFH Exclude bundled libs from gcov processing
65 test -d lcov_data/$$dir && rm -rf lcov_data/$$dir ; \
66 done
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
67 @echo
68 @echo "Generating $@"
25670c59 » Ilia Alshanetsky
2005-12-08 Final fix for gcov generation.
69 @$(LTP) --directory lcov_data/ --capture --base-directory=lcov_data --output-file $@
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
70
71 lcov-html: php_lcov.info
72 @echo "Generating lcov HTML"
17ff2f42 » Nuno Lopes
2007-01-04 remove --show-details from lcov's genhtml, as currently we don't sepa…
73 @$(LTP_GENHTML) --legend --output-directory lcov_html/ --title "PHP Code Coverage" php_lcov.info
30dc899c » foobar
2005-11-29 MFH: - Added --enable-gcov configure option to enable C-level code co…
74
75 lcov-clean:
76 rm -f php_lcov.info
77 rm -rf lcov_data/
78 rm -rf lcov_html/
79
Something went wrong with that request. Please try again.