Page MenuHomePhabricator

Enable coverage reports for taint-check
Closed, ResolvedPublic

Description

Although it doesn't use @covers tags, it might be useful to spot areas which need more coverage. This is currently not doable for CI, as running taint-check (or even just phan) with xdebug enabled is prohibitively slow. Integration tests only might still run reasonably quick, but I guess this can be considered blocked on T234020.

Event Timeline

Integration tests only might still run reasonabley quick

Or maybe not. On my machine, 6m 49s with xdebug 2.9.1. Which gets a little better with xdebug 3.0.0 in "coverage" mode: 2m 13s. The clear winner is once again pcov, with just 16s. For comparison, running without coverage takes 9s.

Change 838917 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[integration/config@master] layout: [mediawiki/tools/phan/SecurityCheckPlugin] Generate coverage on postmerge

https://gerrit.wikimedia.org/r/838917

Change 838917 merged by jenkins-bot:

[integration/config@master] layout: [mediawiki/tools/phan/SecurityCheckPlugin] Publish PHP coverage

https://gerrit.wikimedia.org/r/838917

Mentioned in SAL (#wikimedia-releng) [2022-10-05T22:03:23Z] <James_F> layout: [mediawiki/tools/phan/SecurityCheckPlugin] Publish PHP coverage for T279423

Jdforrester-WMF subscribed.

This should be fixed, though we'll find out when the next patch merges.

One more config change to do

Change 838935 had a related patch set uploaded (by Daimona Eaytoy; author: Daimona Eaytoy):

[mediawiki/tools/phan/SecurityCheckPlugin@master] Configure code coverage

https://gerrit.wikimedia.org/r/838935

Change 838935 merged by jenkins-bot:

[mediawiki/tools/phan/SecurityCheckPlugin@master] Configure code coverage

https://gerrit.wikimedia.org/r/838935