-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test coverage support to android_local_test #15840
Add test coverage support to android_local_test #15840
Conversation
aed7f1c
to
2638341
Compare
|
||
# Asserts that the coverage file exists by looking at the current $TEST_log. | ||
# The method fails if TEST_log does not contain any coverage report for a passed test. | ||
function assert_coverage_file_exists() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps it would be prudent to assert that the contents of the coverage dat file are valid? Even asserting that there is at least 1 row in the file would be sufficient: [[ $(wc -l $coverage_file_path) -gt 0 ]] || fail "Insufficient data in coverage data file $coverage_file_path"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with some additional test cases around coverage contents and lcov merging contents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like there were some Windows-related failures in the latest presubmit; any idea about those?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ted-xie everything should be passing. The windows failures were build flakes.
1d421f7
to
c7ea2f0
Compare
c7ea2f0
to
3f10bf3
Compare
3f10bf3
to
e56b644
Compare
@sofiethorsen thanks for pinging me. I think we should merge this in. |
Adding test coverage support to `android_local_test`. bazelbuild#15827 Closes bazelbuild#15840. RELNOTES: Adds coverage metric support to android_local_test PiperOrigin-RevId: 508549884 Change-Id: I6977efa51ca1c7a6df1f776fe1a326d07989a185
Adding test coverage support to `android_local_test`. bazelbuild#15827 Closes bazelbuild#15840. RELNOTES: Adds coverage metric support to android_local_test PiperOrigin-RevId: 508549884 Change-Id: I6977efa51ca1c7a6df1f776fe1a326d07989a185
@bazel-io fork 6.1.0 |
Adding test coverage support to `android_local_test`. bazelbuild#15827 Closes bazelbuild#15840. RELNOTES: Adds coverage metric support to android_local_test PiperOrigin-RevId: 508549884 Change-Id: I6977efa51ca1c7a6df1f776fe1a326d07989a185
Adding test coverage support to `android_local_test`. bazelbuild#15827 Closes bazelbuild#15840. RELNOTES: Adds coverage metric support to android_local_test PiperOrigin-RevId: 508549884 Change-Id: I6977efa51ca1c7a6df1f776fe1a326d07989a185
Adding test coverage support to `android_local_test`. bazelbuild#15827 Closes bazelbuild#15840. RELNOTES: Adds coverage metric support to android_local_test PiperOrigin-RevId: 508549884 Change-Id: I6977efa51ca1c7a6df1f776fe1a326d07989a185
* Propagate runfiles for singlejar. Since the singlejar toolchain attribute is currently defined as a single file and carried around as an Artifact instead of a FilesToRunProvider, it's not possible to implement it as a wrapper script that dispatches to an actual implementation somewhere in its runfiles. This would be useful to experiment with cross-platform action sharing. PiperOrigin-RevId: 492487124 Change-Id: Ib0f80314eae09bd865b3f31a4180bf068833cdf4 * Add test coverage support to android_local_test Adding test coverage support to `android_local_test`. #15827 Closes #15840. RELNOTES: Adds coverage metric support to android_local_test PiperOrigin-RevId: 508549884 Change-Id: I6977efa51ca1c7a6df1f776fe1a326d07989a185 --------- Co-authored-by: Googler <tjgq@google.com> Co-authored-by: Benjamin Lee <ben@ben.cm> Co-authored-by: kshyanashree <109167932+kshyanashree@users.noreply.github.com>
Adding test coverage support to
android_local_test
.#15827