Java code coverage from sh_test

88 views
Skip to first unread message

Daniel Halperin

unread,
Jun 2, 2018, 1:57:00 AM6/2/18
to bazel-...@googlegroups.com
We have a mix of JUnit tests and sh_tests that invoke a binary in a test scenario. `bazel coverage //... --jobs 1` [0] works great for the unit tests, but does not generate a coverage.dat for the sh_tests.


I tried figuring out how the Java coverage works under the hood, but I got fairly stymied. Any guidance?

Thanks,
Dan

[0] `--jobs 1` workaround for crash: https://github.com/bazelbuild/bazel/issues/4398

Irina Iancu

unread,
Jun 5, 2018, 10:14:22 AM6/5/18
to dan...@halper.in, bazel-discuss
Hi Daniel,

Can you file a bug and assign it to me (iirina@)? I will try to reproduce it.  How many reports do you get from the coverage invocation?

FYI I'm currently working on fixing [0]. 

Thanks,
Irina

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAChJXxMtFN5%2BUkHDouRJYfzm7sm7b7eU4rJB9-QPNdb_TmLCwg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Daniel Halperin

unread,
Jun 5, 2018, 12:51:27 PM6/5/18
to Irina Iancu, bazel-discuss
On Tue, Jun 5, 2018 at 7:14 AM, 'Irina Iancu' via bazel-discuss <bazel-...@googlegroups.com> wrote:
Hi Daniel,

Can you file a bug and assign it to me (iirina@)? I will try to reproduce it.  How many reports do you get from the coverage invocation?

FYI I'm currently working on fixing [0]. 

Thanks Irina! I filed https://github.com/bazelbuild/bazel/issues/5331 with the answers to your questions and hopefully very clear repro instructions.

Dan
 

Thanks,
Irina

On Sat, Jun 2, 2018 at 7:56 AM Daniel Halperin <dan...@halper.in> wrote:
We have a mix of JUnit tests and sh_tests that invoke a binary in a test scenario. `bazel coverage //... --jobs 1` [0] works great for the unit tests, but does not generate a coverage.dat for the sh_tests.


I tried figuring out how the Java coverage works under the hood, but I got fairly stymied. Any guidance?

Thanks,
Dan

[0] `--jobs 1` workaround for crash: https://github.com/bazelbuild/bazel/issues/4398

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAEwuVB1tBUY%3D_zmQO%3DiVq-SP-k-uzYtj8c%2BeKgc4s5C%3DbMOe9w%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages