Page 1 of 1

Getting coverage from PHP core

Posted: Sun Jan 24, 2010 6:03 am
by bnoam
Hello,

I would like some help with getting coverage data of PHP core. I know the HTML coverage files are under PHP web site, but I need the actual data files *.gcda that are created from the tests in order to import them to my own coverage tool.

So I have the installation src files "php-5.2.9.tar.gz" and I would like to have instructions on how to get the coverage data files.

Thanks.

Noam

Re: Getting coverage from PHP core

Posted: Sun Jan 24, 2010 6:23 am
by Weirdan

Re: Getting coverage from PHP core

Posted: Sun Jan 24, 2010 7:46 am
by bnoam
Thanks for your reply,

I already visited this site, but it didn't help me.

I need to combine it with the the tests that php provides (there are about 6000 tests).

Can you please write in more details the steps I need in order to - first instrument the files, and then get run tests coverage results?

Noam

Re: Getting coverage from PHP core

Posted: Sun Jan 24, 2010 1:39 pm
by bnoam
Anyone?

I'll explain myself again in case I wasn't clear.

When I unzip php-5.2.9.tar.gz I get the PHP core files. These files contain, among the rest, about 800 c files. I would like to get the coverage results on these c files from the PHP built-in tests.Not as HTML but as the raw data that gcov exports.

Thanks

Noam

Re: Getting coverage from PHP core

Posted: Sun Jun 06, 2010 6:42 am
by markusn00b
You need to configure PHP with --enable-gcov. This will then generate the Makefile.gcov file. From there, you make && make test, and you should find your gcov data.