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.

AttachmentSize
coverage.patch2.05 KB

Comments

#1

Assigned to:Anonymous» boombatower

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.

AttachmentSize
293298-core-patch.patch 559 bytes

#2

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

#3

Status:needs review» needs work

#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.

AttachmentSize
293298-core-patch.patch 3.2 KB

#5

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

AttachmentSize
293298-core-patch.patch 4.89 KB

#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

Title:Ship with core patch» Add a .patch file for core
Status:needs work» needs review

#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')

AttachmentSize
_d7.code_coverage.patch 367 bytes

#9

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.

#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

Status:fixed» closed (fixed)

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

nobody click here