[prev in list] [next in list] [prev in thread] [next in thread] 

List:       vdsm-devel
Subject:    Re: [ovirt-devel] [VDSM] Coverage reports
From:       Nir Soffer <nsoffer () redhat ! com>
Date:       2015-11-27 23:42:01
Message-ID: CAMRbyyvD8nUf7b0hzA0tdm2N=ZJz-SiGoKRffVUCKgPg6T=nSQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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/artifact/exported-artifacts/htmlcov/status.json


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


[Attachment #5 (text/html)]

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



_______________________________________________
Devel mailing list
Devel@ovirt.org
http://lists.ovirt.org/mailman/listinfo/devel

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic