From 7b3de8f85bb84160d25e98c3952512d0c9320841 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Mon, 30 Mar 2020 18:00:25 +0100 Subject: Add apex_available to sysprop_library Added apex_available support to sysprop_library and copied it onto the underlying cc_library. Bug: 152762638 Test: m nothing Change-Id: I8f4c539532b48f3a45c1fbf0f7287db11df69d2f --- sysprop/sysprop_test.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sysprop/sysprop_test.go') diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go index 51da22205..850338675 100644 --- a/sysprop/sysprop_test.go +++ b/sysprop/sysprop_test.go @@ -15,6 +15,8 @@ package sysprop import ( + "reflect" + "android/soong/android" "android/soong/cc" "android/soong/java" @@ -157,6 +159,7 @@ func TestSyspropLibrary(t *testing.T) { ctx := test(t, ` sysprop_library { name: "sysprop-platform", + apex_available: ["//apex_available:platform"], srcs: ["android/sysprop/PlatformProperties.sysprop"], api_packages: ["android.sysprop"], property_owner: "Platform", @@ -305,7 +308,12 @@ func TestSyspropLibrary(t *testing.T) { "android_arm64_armv8-a_shared", "android_arm64_armv8-a_static", } { - ctx.ModuleForTests("libsysprop-platform", variant) + library := ctx.ModuleForTests("libsysprop-platform", variant).Module().(*cc.Module) + expectedApexAvailableOnLibrary := []string{"//apex_available:platform"} + if !reflect.DeepEqual(library.ApexProperties.Apex_available, expectedApexAvailableOnLibrary) { + t.Errorf("apex available property on libsysprop-platform must be %#v, but was %#v.", + expectedApexAvailableOnLibrary, library.ApexProperties.Apex_available) + } // core variant of vendor-owned sysprop_library is for product ctx.ModuleForTests("libsysprop-vendor", variant) -- cgit v1.2.3-59-g8ed1b