Page MenuHomePhabricator

Generate clover.xml files for JavaScript libraries, removing the karma JSON report files if they exist
Closed, ResolvedPublic

Description

Just like rCICF62119a37df15: Publish clover.xml files for machine-readable coverage information, create clover.xml files for JavaScript libraries so other tools can read the coverage information.

Event Timeline

Legoktm created this task.Oct 26 2017, 1:47 AM
Restricted Application removed a project: Patch-For-Review. · View Herald TranscriptOct 26 2017, 1:47 AM

Change 386568 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[unicodejs@master] Generate clover.xml with code coverage results

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

Change 386569 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[VisualEditor/VisualEditor@master] Generate clover.xml with code coverage results

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

Change 386570 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[oojs/core@master] Generate clover.xml with code coverage results

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

Change 386571 had a related patch set uploaded (by Legoktm; owner: Legoktm):
[oojs/ui@master] Generate clover.xml with code coverage results

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

Also unicodejs and visualeditor put their coverage in a subdirectory called Chrome 57.0.2987 (Linux 0.0.0) (or whatever version of Chromium was used) - we need to figure out a way to disable that too.

Hmm. Why use this clover XML file rather than the existing machine-readable JSON coverage files? Is there a task explaining why?

Also unicodejs and visualeditor put their coverage in a subdirectory called Chrome 57.0.2987 (Linux 0.0.0) (or whatever version of Chromium was used) - we need to figure out a way to disable that too.

Oh, right yeah, we never applied the karma-remap-istanbul trick that @Krinkle found for 3fb557533436625334600af543aa7fbb8384090c and which I ported to OOjs UI but not the other major JS repos.

Hmm. Why use this clover XML file rather than the existing machine-readable JSON coverage files? Is there a task explaining why?

clover is a standardized format that is common between jenkins, phpunit and istanbul (js). nosetests (python) supports a different standard xml format that we can probably convert into clover (see T179054). While istanbul's JSON format is documented, it's not standardized and would require having different code to parse the results - I'd rather just use clover everywhere.

Hmm. Why use this clover XML file rather than the existing machine-readable JSON coverage files? Is there a task explaining why?

clover is a standardized format that is common between jenkins, phpunit and istanbul (js). nosetests (python) supports a different standard xml format that we can probably convert into clover (see T179054). While istanbul's JSON format is documented, it's not standardized and would require having different code to parse the results - I'd rather just use clover everywhere.

Seems reasonable. Should we drop all the JSON ones then?

Seems reasonable. Should we drop all the JSON ones then?

Sounds good to me. I believe we only added them because of vague plans relating to T101545 and T101544. But those can just as well work on Clover.xml.

Change 386569 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] build: Replace JSON code coverage report with clover.xml one

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

Change 386568 merged by jenkins-bot:
[unicodejs@master] build: Replace JSON code coverage report with clover.xml one

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

Change 386571 merged by jenkins-bot:
[oojs/ui@master] Generate clover.xml with code coverage results

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

Jdforrester-WMF renamed this task from Generate clover.xml files for JavaScript libraries to Generate clover.xml files for JavaScript libraries, removing the karma JSON report files if they exist.Oct 26 2017, 7:28 PM

Change 386570 merged by Krinkle:
[oojs/core@master] Generate clover.xml with code coverage results

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

Legoktm closed this task as Resolved.Oct 26 2017, 10:37 PM

Nope, all the repos without information on https://doc.wikimedia.org/cover/ have other problems :)