Posted by catch on August 9, 2008 at 8:15pm
| Project: | Code coverage |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | task |
| Priority: | normal |
| Assigned: | boombatower |
| Status: | closed (fixed) |
Issue Summary
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.
| Attachment | Size |
|---|---|
| coverage.patch | 2.05 KB |
Comments
#1
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.
#2
Looks like this may not work as well as I thought, but we definitly need all the mentioned locations included in coverage.
#3
#4
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.
#5
That should solve the query issue, but I still need to test with simpletest.
#6
drupal_register_shutdown_function() does not exist before bootstraps...so that'll will need to be delt with.
#7
I don't understand why #1 didn't work. Placing the require_once into bootstrap.inc seems to be correct, IMO.
#8
#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')#9
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.
#10
Thanks :)
However, coding style issue with if condition control structure in the follow-up commit http://drupalcode.org/project/code_coverage.git/commitdiff/caf6723b57fc3...
#11
Automatically closed -- issue fixed for 2 weeks with no activity.