Fixing make lcov with TESTS variable

From: Date: Sat, 05 Jun 2010 14:07:38 +0000
Subject: Fixing make lcov with TESTS variable
Groups: php.qa 
Request: Send a blank email to php-qa+get-65566@lists.php.net to get a copy of this message
Hi all During our testfest, Patrick Allaert was looking at fixing the issue when you want to get code coverage for only a specific part of the testsuite, eg: $ make lcov TESTS=ext/date/ This wasn't working anymore for quite some time, with the cause being an error in the generated makefile. I've created a diff for Makefile.gcov, which is used to generate the Makefile when configuring PHP. The issue here is that $(PHP_MODULES) is always empty, and sourcing it doesn't work. Also, the tests/ directory was hardcoded instead of using the $(TESTS) variable. ~/svn/php-5.3$ svn diff Makefile.gcov Index: Makefile.gcov =================================================================== --- Makefile.gcov (revision 300180) +++ Makefile.gcov (working copy) @@ -13,7 +13,7 @@ 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/; \ + $(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/' $(TESTS); \ elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \ NO_INTERACTION=1 \ TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \ Is there an issue if I'd commit this? Regards, Felix

« previous php.qa (#65566) next »