diff options
author | 2023-09-27 16:22:10 +0900 | |
---|---|---|
committer | 2023-09-27 16:36:40 +0900 | |
commit | af1fde43f96196a191db326048cf04d64346877e (patch) | |
tree | abf46eaf50c8ba0ed68f06644cc2f16b1efa814a /sysprop | |
parent | c5b9abba309e4bb65e6ae69c60b44d0f4b59e278 (diff) |
Generate product variants by default
PRODUCT_PRODUCT_VNDK_VERSION is set to 'current' by default. Now, we
can generate product variants without checking the
PRODUCT_PRODUCT_VNDK_VERSION build variable. Remove reading the
PRODUCT_PRODUCT_VNDK_VERSION variable from soong and generate product
variants by default.
Bug: 302255959
Test: m
Change-Id: I9a9b2076f4367c5ce9a393bbb206f8dee3884bd8
Diffstat (limited to 'sysprop')
-rw-r--r-- | sysprop/sysprop_test.go | 26 |
1 files changed, 17 insertions, 9 deletions
diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go index 80b86e059..e51fe39c9 100644 --- a/sysprop/sysprop_test.go +++ b/sysprop/sysprop_test.go @@ -42,6 +42,7 @@ func test(t *testing.T, bp string) *android.TestResult { cc_library_headers { name: "libbase_headers", vendor_available: true, + product_available: true, recovery_available: true, } @@ -250,6 +251,16 @@ func TestSyspropLibrary(t *testing.T) { result.ModuleForTests("libsysprop-odm", variant) } + // product variant of vendor-owned sysprop_library + for _, variant := range []string{ + "android_product.29_arm_armv7-a-neon_shared", + "android_product.29_arm_armv7-a-neon_static", + "android_product.29_arm64_armv8-a_shared", + "android_product.29_arm64_armv8-a_static", + } { + result.ModuleForTests("libsysprop-vendor-on-product", variant) + } + for _, variant := range []string{ "android_arm_armv7-a-neon_shared", "android_arm_armv7-a-neon_static", @@ -259,9 +270,6 @@ func TestSyspropLibrary(t *testing.T) { library := result.ModuleForTests("libsysprop-platform", variant).Module().(*cc.Module) expectedApexAvailableOnLibrary := []string{"//apex_available:platform"} android.AssertDeepEquals(t, "apex available property on libsysprop-platform", expectedApexAvailableOnLibrary, library.ApexProperties.Apex_available) - - // product variant of vendor-owned sysprop_library - result.ModuleForTests("libsysprop-vendor-on-product", variant) } result.ModuleForTests("sysprop-platform", "android_common") @@ -272,15 +280,15 @@ func TestSyspropLibrary(t *testing.T) { // Check for exported includes coreVariant := "android_arm64_armv8-a_static" vendorVariant := "android_vendor.29_arm64_armv8-a_static" + productVariant := "android_product.29_arm64_armv8-a_static" platformInternalPath := "libsysprop-platform/android_arm64_armv8-a_static/gen/sysprop/include" - platformPublicCorePath := "libsysprop-platform/android_arm64_armv8-a_static/gen/sysprop/public/include" platformPublicVendorPath := "libsysprop-platform/android_vendor.29_arm64_armv8-a_static/gen/sysprop/public/include" - platformOnProductPath := "libsysprop-platform-on-product/android_arm64_armv8-a_static/gen/sysprop/public/include" + platformOnProductPath := "libsysprop-platform-on-product/android_product.29_arm64_armv8-a_static/gen/sysprop/public/include" vendorInternalPath := "libsysprop-vendor/android_vendor.29_arm64_armv8-a_static/gen/sysprop/include" - vendorPublicPath := "libsysprop-vendor-on-product/android_arm64_armv8-a_static/gen/sysprop/public/include" + vendorOnProductPath := "libsysprop-vendor-on-product/android_product.29_arm64_armv8-a_static/gen/sysprop/public/include" platformClient := result.ModuleForTests("cc-client-platform", coreVariant) platformFlags := platformClient.Rule("cc").Args["cFlags"] @@ -294,14 +302,14 @@ func TestSyspropLibrary(t *testing.T) { // platform-static should use platform's internal header android.AssertStringDoesContain(t, "flags for platform-static", platformStaticFlags, platformInternalPath) - productClient := result.ModuleForTests("cc-client-product", coreVariant) + productClient := result.ModuleForTests("cc-client-product", productVariant) productFlags := productClient.Rule("cc").Args["cFlags"] // Product should use platform's and vendor's public headers if !strings.Contains(productFlags, platformOnProductPath) || - !strings.Contains(productFlags, vendorPublicPath) { + !strings.Contains(productFlags, vendorOnProductPath) { t.Errorf("flags for product must contain %#v and %#v, but was %#v.", - platformPublicCorePath, vendorPublicPath, productFlags) + platformOnProductPath, vendorOnProductPath, productFlags) } vendorClient := result.ModuleForTests("cc-client-vendor", vendorVariant) |