To save time editing manually.

I nearly made this a patch to add the patch to the module directory, but that would've been overkill.

Comments

boombatower’s picture

Assigned: Unassigned » boombatower
StatusFileSize
new559 bytes

Moved the bit of code to the top of bootstrap.inc so it will be called first by xmlrpc.php, index.php, install.php, update.php etc instead of patching those individually.

I'll re-look into what is needed for SimpleTest next.

boombatower’s picture

Looks like this may not work as well as I thought, but we definitly need all the mentioned locations included in coverage.

boombatower’s picture

Status: Needs review » Needs work
boombatower’s picture

StatusFileSize
new3.2 KB

This includes all files, but does nothing with testing system at the moment.

update.php is not ideal, since the file docblock is not at the top the $Id$ will screw up when the patch file is committed, so for now the first line will never be counted.

in xdebug.inc it does a query in simpletest table that won't work since this code runs before bootstraps, so I'll need to fix that up.

boombatower’s picture

StatusFileSize
new4.89 KB

That should solve the query issue, but I still need to test with simpletest.

boombatower’s picture

drupal_register_shutdown_function() does not exist before bootstraps...so that'll will need to be delt with.

sun’s picture

I don't understand why #1 didn't work. Placing the require_once into bootstrap.inc seems to be correct, IMO.

sun’s picture

Title: Ship with core patch » Add a .patch file for core
Status: Needs work » Needs review
StatusFileSize
new367 bytes

#983808: Fix Simpletest integration has been committed.

In my testing, the approach of #1 works flawlessly. Here's a new patch.

Also note that I've moved the global variable into the .xdebug.inc file itself. Overall, I'm not sure whether it is useful in any way though. The same could be achieved by testing function_exists('code_coverage_report')

boombatower’s picture

Status: Needs review » Fixed

Re-rolled with format-patch just for kicks and committed. I do not remember for sure, but I believe the reason is the fact that xmlrpc.php used to or still does have code that runs before bootstraps that would always be marked as not run, but we can deal with that later if we really want to.

sun’s picture

Thanks :)

However, coding style issue with if condition control structure in the follow-up commit http://drupalcode.org/project/code_coverage.git/commitdiff/caf6723b57fc3...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.