summaryrefslogtreecommitdiff
path: root/apex
diff options
context:
space:
mode:
Diffstat (limited to 'apex')
-rw-r--r--apex/apex.go4
-rw-r--r--apex/vndk_test.go39
2 files changed, 5 insertions, 38 deletions
diff --git a/apex/apex.go b/apex/apex.go
index 03df0fb0a..1947980ad 100644
--- a/apex/apex.go
+++ b/apex/apex.go
@@ -1603,6 +1603,8 @@ func (a *apexBundle) IsSanitizerEnabled(ctx android.BaseModuleContext, sanitizer
return android.InList(sanitizerName, globalSanitizerNames)
}
+var _ cc.Coverage = (*apexBundle)(nil)
+
func (a *apexBundle) IsNativeCoverageNeeded(ctx android.BaseModuleContext) bool {
return ctx.Device() && (ctx.DeviceConfig().NativeCoverageEnabled() || ctx.DeviceConfig().ClangCoverageEnabled())
}
@@ -1619,6 +1621,8 @@ func (a *apexBundle) MarkAsCoverageVariant(coverage bool) {
a.properties.IsCoverageVariant = coverage
}
+func (a *apexBundle) EnableCoverageIfNeeded() {}
+
// TODO(jiyong) move apexFileFor* close to the apexFile type definition
func apexFileForNativeLibrary(ctx android.BaseModuleContext, ccMod *cc.Module, handleSpecialLibs bool) apexFile {
// Decide the APEX-local directory by the multilib of the library
diff --git a/apex/vndk_test.go b/apex/vndk_test.go
index 523ac2630..05cdfcd92 100644
--- a/apex/vndk_test.go
+++ b/apex/vndk_test.go
@@ -117,44 +117,7 @@ func TestVndkApexUsesVendorVariant(t *testing.T) {
})
t.Run("VNDK APEX supports coverage variants", func(t *testing.T) {
- ctx, _ := testApex(t, bp+`
- cc_library {
- name: "libprofile-extras",
- vendor_available: true,
- recovery_available: true,
- native_coverage: false,
- system_shared_libs: [],
- stl: "none",
- notice: "custom_notice",
- }
- cc_library {
- name: "libprofile-clang-extras",
- vendor_available: true,
- recovery_available: true,
- native_coverage: false,
- system_shared_libs: [],
- stl: "none",
- notice: "custom_notice",
- }
- cc_library {
- name: "libprofile-extras_ndk",
- vendor_available: true,
- native_coverage: false,
- system_shared_libs: [],
- stl: "none",
- notice: "custom_notice",
- sdk_version: "current",
- }
- cc_library {
- name: "libprofile-clang-extras_ndk",
- vendor_available: true,
- native_coverage: false,
- system_shared_libs: [],
- stl: "none",
- notice: "custom_notice",
- sdk_version: "current",
- }
- `, func(fs map[string][]byte, config android.Config) {
+ ctx, _ := testApex(t, bp, func(fs map[string][]byte, config android.Config) {
config.TestProductVariables.Native_coverage = proptools.BoolPtr(true)
})