sniper Tue Nov 8 15:27:11 2005 EDT
Removed files:
/php-src gen_php_cov
Modified files:
/php-src Makefile.gcov
Log:
- Moved gen_php_cov functionality into the Makefile. Doing 'make lcov'
will run the test suite and create the code coverage HTML files.
# no need for some hairy checks whether PHP has the support
# since the lcov target will not exist if it doesn't :)
http://cvs.php.net/diff.php/php-src/Makefile.gcov?r1=1.2&r2=1.3&ty=u
Index: php-src/Makefile.gcov
diff -u php-src/Makefile.gcov:1.2 php-src/Makefile.gcov:1.3
--- php-src/Makefile.gcov:1.2 Tue Nov 8 11:43:09 2005
+++ php-src/Makefile.gcov Tue Nov 8 15:27:08 2005
@@ -3,9 +3,28 @@
# LCOV
#
-lcov: php_lcov.info
+lcov: lcov-html
-php_lcov.info:
+lcov-test: all
+ @echo "Running test suite"
+ @find . -name \*.gcda | xargs rm -f
+ [EMAIL PROTECTED] test ! -z "$(PHP_EXECUTABLE)" && test -x
"$(PHP_EXECUTABLE)"; then \
+ NO_INTERACTION=1 \
+ TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
+ TEST_PHP_SRCDIR=$(top_srcdir) \
+ CC="$(CC)" \
+ $(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/; \
+ elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
+ NO_INTERACTION=1 \
+ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
+ TEST_PHP_SRCDIR=$(top_srcdir) \
+ CC="$(CC)" \
+ $(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); \
+ else \
+ echo "ERROR: Cannot run tests without CLI sapi."; \
+ fi
+
+php_lcov.info: lcov-test
@echo "Generating data for $@"
@rm -rf lcov_data/
@$(mkinstalldirs) lcov_data/
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php