Speed up code coverage generation for local development
authorKosta Harlan <kharlan@wikimedia.org>
Wed, 3 Jul 2019 14:48:55 +0000 (10:48 -0400)
committerKosta Harlan <kharlan@wikimedia.org>
Tue, 9 Jul 2019 15:14:23 +0000 (11:14 -0400)
commit9f865209d6cc80ea00b9391679ad5736d5f437ea
tree17a09f84e8203a02dd9b376e38cecd29c12fe2d3
parent419849211e3a638884f13d9a7a7f43b898d1d2a4
Speed up code coverage generation for local development

Changing addUncoveredFilesFromWhitelist to false drastically speeds up code
coverage report generation. Including extensions/skins in the config also
removes the need to manually edit your phpunit.xml file when you want to inspect
code coverage for your extension or skin locally.

With this patch you can very quickly generate coverage for an extension/skin or
subsection of core, this is especially useful if you are using an IDE that
supports running a test and importing its coverage into the editor.

The downside to this patch is that the coverage report only contains
information about code that's exercised by the tests, so this patch on its own
is unsuitable for our current processes in integration/config which generate a
full code coverage report per patch for extensions or post-merge for core.

However, since we are not yet using phpunit.xml.dist in CI, this patch should be
OK to merge as is. A follow-up patch to integration/config will use sed or
phpunit-suite-edit.py to set processUncoveredFilesFromWhitelist to true.

Bug: T192078
Change-Id: I3d19627fa36f6cc6666c29fdb638272fdaa30630
phpunit.xml.dist