
On Fri, Nov 27, 2015 at 9:20 PM, David Caro Estevez <dcaro@redhat.com> wrote:
On 11/27 20:57, Nir Soffer wrote:
Todo:
- Easy way to access the report from gerrit It should be easy to add a link the coverage report in the comment added by jenkins after a build finish.
Not really, the gerrit comments that jenkins sends can't be changed by the build, that means that you can't put put there a non-static url. There's a quite tricky way that can be done with groovy postscripts and accessing the jenkins inner objects, but that's very likely to break on any plugin upgrade and requires a bit of investigating with objects to change.
The url for the coverage report is the build url we see in gerrit + ' /artifact/exported-artifacts/htmlcov/index.html <http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/648/artifact/exported-artifacts/htmlcov/index.html> ' Maybe this can be added by a gerrit plugin? Another option - can we add nice "coverage" link to jenkins build page? One click on the build link from gerrit, and another on the build page is better then typing the url manually.
- The report is using absolute paths, but we like shorter relative paths.
I don't see a way to configure nosetests or coverage to generate relative paths. May need hacking of the generated html/json in htmlcov.
If you find it please tell me, I have the same issue with other projects, I'll do if I discover a way :)
I found this json, which looks like something that can be easily hack: http://jenkins.ovirt.org/job/vdsm_master_check-patch-fc23-x86_64/665/artifac... I did not try, but maybe modifying "relative_filename" will do the trick. We can wrap coverage with our own script creating a report and cleaning it up. Nir