fixed coverage report inclusion #505
Conversation
406cb1a to
2c3b3a3
Compare
| - name: Run Unit Test with Coverage for C++ | ||
| id: run-coverage | ||
| run: | | ||
| bazel coverage //... --build_tests_only |
There was a problem hiding this comment.
We do not want to filter by unit tests only.
| size = "small", | ||
| timeout = "short", | ||
| tags = tags + ["manual"], | ||
| tags = tags + ["unit"], |
There was a problem hiding this comment.
This change (the whole commit) has the side effect, that we will only execute _linux and _qnx, which is not waht we want. Thus we should drop that commit. I merged for this problem already a solution.
| ":unix_domain_test", | ||
| "@score_communication//score/message_passing/log:log_test", | ||
| "@score_communication//score/message_passing/non_allocating_future:non_allocating_future_test", | ||
| ":client_connection_test_linux", |
There was a problem hiding this comment.
Since we drop previus commit we can drop this also.
|
|
||
| # With this instrumentation filter for our two main components, we ensure that `bazel coverage //...` is yielding the correct results | ||
| coverage --instrumentation_filter="^//score/message_passing[/:],^//score/mw/com[/:],-//score/mw/com/performance_benchmarks[/:],-//score/mw/.*/test[/:]". | ||
| coverage --instrument_test_targets |
There was a problem hiding this comment.
Why do we want to instrument the test targets? If we don't do that, you do not have to filter it later.
| # With this instrumentation filter for our two main components, we ensure that `bazel coverage //...` is yielding the correct results | ||
| coverage --instrumentation_filter="^//score/message_passing[/:],^//score/mw/com[/:],-//score/mw/com/performance_benchmarks[/:],-//score/mw/.*/test[/:]". | ||
| coverage --instrument_test_targets | ||
| coverage --nobuild_tests_only |
There was a problem hiding this comment.
We want to build everything,
| --ignore-errors category,inconsistent | ||
| --filter line,branch,range,region,branch_region \ | ||
| --rc no_exception_branch=1 \ | ||
| --ignore-errors category,inconsistent,mismatch |
There was a problem hiding this comment.
I see no reason to change that?
| --branch-coverage \ | ||
| --ignore-errors category,inconsistent | ||
| --filter line,branch,range,region,branch_region \ | ||
| --rc no_exception_branch=1 \ |
| --function-coverage \ | ||
| --branch-coverage \ | ||
| --ignore-errors category,inconsistent | ||
| --filter line,branch,range,region,branch_region \ |
| id: run-coverage | ||
| run: | | ||
| bazel coverage //... --build_tests_only | ||
| bazel coverage //... --test_tag_filters=unit |
There was a problem hiding this comment.
We do not want to change this.
|
|
||
| ```bash | ||
| bazel coverage //... | ||
| bazel coverage //... --test_tag_filters=unit |
2c3b3a3 to
71e621e
Compare
-More stable coverage in CI
-Reduced false uncovered lines from non-executable content
-Clearer branch coverage signal
-Better alignment with the reference coverage