Add gcov coverage support to Rust modules.

This adds gcov coverage support for Rust device library and binary
modules (including test modules). Support is provided to pass Rust
static library gcno files to CC modules and visa versa.

Additional changes:
 * Begin mutator added for Rust modules.
 * SuffixInList added to android package.
 * CoverageEnabled added to Coverage interface.
 * CoverageFiles added to LinkableLibrary interface.
 * Fix in coverage mutator for non-CC modules which marked the wrong
   variant as the coverage variant.
 * Added coverage libraries to the cc.GatherRequiredDepsForTest.

Bug: 146448203
Test: NATIVE_COVERAGE=true COVERAGE_PATHS='*' m -j <rust_module>
Change-Id: If20728bdde42a1dd544a35a40f0d981b80a5835f
This commit is contained in:
Ivan Lozano
2020-04-09 09:56:02 -04:00
parent b8bb5d05ce
commit a0cd8f9acb
21 changed files with 628 additions and 91 deletions

View File

@@ -391,6 +391,7 @@ bootstrap_go_package {
srcs: [
"rust/androidmk.go",
"rust/compiler.go",
"rust/coverage.go",
"rust/binary.go",
"rust/builder.go",
"rust/library.go",
@@ -403,6 +404,7 @@ bootstrap_go_package {
testSrcs: [
"rust/binary_test.go",
"rust/compiler_test.go",
"rust/coverage_test.go",
"rust/library_test.go",
"rust/rust_test.go",
"rust/test_test.go",