From 1a6acd4f39b8ea2b030444deb4ecdb0af652e5aa Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Tue, 16 Jun 2020 17:51:46 -0700 Subject: Make native_coverage clause work with ClangCoverage Make uses NATIVE_COVERAGE to enable gcov coverage and CLANG_COVERAGE to enable clang coverage. NATIVE_COVERAGE is translated to the Soong Native_coverage product variable which triggers the native_coverage clause in Android.bp files. The clause also needs to be triggered for CLANG_COVERAGE. Rename the existing Native_coverage product variable to GcovCoverage, and regenerate Native_coverage when either GcovCoverage or ClangCoverage are set. Also remove NativeLineCoverage, it wasn't doing anything differently than Native_coverage. Bug: 159059537 Test: m checkbuild Change-Id: I215124a9b35a2ad50ad562079d392e3d33da11f4 --- rust/rust_test.go | 1 + 1 file changed, 1 insertion(+) (limited to 'rust/rust_test.go') diff --git a/rust/rust_test.go b/rust/rust_test.go index fe21e3a39..703aaed29 100644 --- a/rust/rust_test.go +++ b/rust/rust_test.go @@ -88,6 +88,7 @@ func testRustContext(t *testing.T, bp string, coverage bool) *android.TestContex config := testConfig(bp) if coverage { + config.TestProductVariables.GcovCoverage = proptools.BoolPtr(true) config.TestProductVariables.Native_coverage = proptools.BoolPtr(true) config.TestProductVariables.NativeCoveragePaths = []string{"*"} } -- cgit v1.2.3-59-g8ed1b