Re: Rust code coverage

2019-01-21 Thread Marco Castelluccio
Il 07/01/19 14:36, Henri Sivonen ha scritto:

> On Fri, Jan 4, 2019 at 2:54 PM Marco Castelluccio
>  wrote:
>> Hi everyone,
>> we have recently enabled collecting code coverage for Rust code too,
> Nice!
>
>> running Rust tests in coverage builds.
> Does this mean running cargo test for each crate under
> third_party/rust, running Firefox test suites or both?

Both. We're running Rust specific tests (cargo test) like the Rusttests
builds, and we're running the normal test suites.


>
> As for trying to make sense of what the numbers mean:
>
> Is the coverage ratio reported on lines attributed at all in ELF as
> opposed to looking at the number of lines in the source files?

We're using LLVM GCOV instrumentation, which uses debug info.


>
> What kind of expectations one should have on how the system measures
> coverage for code that gets inlined?

Inlining could cause inconsistencies in line counts, but it shouldn't
cause inconsistencies in "is this line covered or not".

We have thought of disabling inlining for coverage builds in the past,
but there is a big runtime cost.

Also, coverage instrumentation by itself increases the size of the
functions, so fewer functions are inlined than in normal debug builds.

- Marco.

___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Rust code coverage

2019-01-07 Thread Henri Sivonen
On Fri, Jan 4, 2019 at 2:54 PM Marco Castelluccio
 wrote:
> Hi everyone,
> we have recently enabled collecting code coverage for Rust code too,

Nice!

> running Rust tests in coverage builds.

Does this mean running cargo test for each crate under
third_party/rust, running Firefox test suites or both?

As for trying to make sense of what the numbers mean:

Is the coverage ratio reported on lines attributed at all in ELF as
opposed to looking at the number of lines in the source files?

What kind of expectations one should have on how the system measures
coverage for code that gets inlined?

-- 
Henri Sivonen
hsivo...@mozilla.com
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Re: Rust code coverage

2019-01-04 Thread Bobby Holley
On Fri, Jan 4, 2019 at 4:54 AM Marco Castelluccio 
wrote:

> Hi everyone,
> we have recently enabled collecting code coverage for Rust code too,
> running Rust tests in coverage builds.


It'll be great to finally see code coverage for the style system - thanks
for doing this!


> The support is still
> experimental, file bugs in the "Testing::Code Coverage" component if you
> see something fishy.
>
> The Rust reports are merged together with the C/C++/Java/JavaScript
> reports, and as usual you can find them at one of these links (we are
> working on a replacement for them, as they fail to scale to the size of
> our repository, often timing out on load):
>

Yeah - I've been trying intermittently for the last ten minutes and haven't
been able to load
https://codecov.io/gh/mozilla/gecko-dev/tree/master/servo/components/style
successfully.


> https://codecov.io/gh/mozilla/gecko-dev
> https://codecov.io/gh/marco-c/gecko-dev
> https://coveralls.io/github/marco-c/gecko-dev
>
> - Marco.
> ___
> dev-platform mailing list
> dev-platform@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-platform
>
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform


Rust code coverage

2019-01-04 Thread Marco Castelluccio
Hi everyone,
we have recently enabled collecting code coverage for Rust code too,
running Rust tests in coverage builds. The support is still
experimental, file bugs in the "Testing::Code Coverage" component if you
see something fishy.

The Rust reports are merged together with the C/C++/Java/JavaScript
reports, and as usual you can find them at one of these links (we are
working on a replacement for them, as they fail to scale to the size of
our repository, often timing out on load):
https://codecov.io/gh/mozilla/gecko-dev
https://codecov.io/gh/marco-c/gecko-dev
https://coveralls.io/github/marco-c/gecko-dev

- Marco.
___
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform