summaryrefslogtreecommitdiff
path: root/apex/apex_test.go
diff options
context:
space:
mode:
author Kiyoung Kim <kiyoungkim@google.com> 2024-04-04 09:56:15 +0900
committer Kiyoung Kim <kiyoungkim@google.com> 2024-04-05 01:56:56 +0000
commit37693d0a278f62f5a21aab1958440d86f3a78f0a (patch)
treee28a67f8a7dba20a1c57bc6447a733a7f697ce08 /apex/apex_test.go
parent4caca1d797c702f26ca42248a47ebe80c9cbe248 (diff)
Deprecate Snapshot build
Existing snapshot code will no longer work from VNDK deprecation, but it can give confusion to users if we keep code for the snapshot - and it adds complexity on existing code while it is not in use. This change removes all snapshot definition except host snapshot and its usage. Bug: 330100430 Bug: 332986564 Test: AOSP CF build succeeded Change-Id: Ieb6fa43d5e38315c662ce997bc305b744b367c24
Diffstat (limited to 'apex/apex_test.go')
-rw-r--r--apex/apex_test.go168
1 files changed, 0 insertions, 168 deletions
diff --git a/apex/apex_test.go b/apex/apex_test.go
index eacbcebca..fae8fcc00 100644
--- a/apex/apex_test.go
+++ b/apex/apex_test.go
@@ -3905,174 +3905,6 @@ func TestVndkApexWithBinder32(t *testing.T) {
})
}
-func TestVendorApexWithVndkPrebuilts(t *testing.T) {
- ctx := testApex(t, "",
- android.FixtureModifyProductVariables(func(variables android.FixtureProductVariables) {
- variables.DeviceVndkVersion = proptools.StringPtr("27")
- }),
- android.FixtureRegisterWithContext(func(ctx android.RegistrationContext) {
- cc.RegisterVendorSnapshotModules(ctx)
- }),
- withFiles(map[string][]byte{
- "vendor/foo/Android.bp": []byte(`
- apex {
- name: "myapex",
- binaries: ["foo"],
- key: "myapex.key",
- min_sdk_version: "27",
- vendor: true,
- }
-
- cc_binary {
- name: "foo",
- vendor: true,
- srcs: ["abc.cpp"],
- shared_libs: [
- "libllndk",
- "libvndk",
- ],
- nocrt: true,
- system_shared_libs: [],
- min_sdk_version: "27",
- }
-
- apex_key {
- name: "myapex.key",
- public_key: "testkey.avbpubkey",
- private_key: "testkey.pem",
- }
- `),
- // Simulate VNDK prebuilts with vendor_snapshot
- "prebuilts/vndk/Android.bp": []byte(`
- vndk_prebuilt_shared {
- name: "libllndk",
- version: "27",
- vendor_available: true,
- product_available: true,
- target_arch: "arm64",
- arch: {
- arm64: {
- srcs: ["libllndk.so"],
- },
- },
- }
-
- vndk_prebuilt_shared {
- name: "libvndk",
- version: "27",
- vendor_available: true,
- product_available: true,
- target_arch: "arm64",
- arch: {
- arm64: {
- srcs: ["libvndk.so"],
- },
- },
- vndk: {
- enabled: true,
- },
- min_sdk_version: "27",
- }
-
- vndk_prebuilt_shared {
- name: "libc++",
- version: "27",
- target_arch: "arm64",
- vendor_available: true,
- product_available: true,
- vndk: {
- enabled: true,
- support_system_process: true,
- },
- arch: {
- arm64: {
- srcs: ["libc++.so"],
- },
- },
- min_sdk_version: "apex_inherit",
- }
-
- vendor_snapshot {
- name: "vendor_snapshot",
- version: "27",
- arch: {
- arm64: {
- vndk_libs: [
- "libc++",
- "libllndk",
- "libvndk",
- ],
- static_libs: [
- "libc++demangle",
- "libclang_rt.builtins",
- "libunwind",
- ],
- },
- }
- }
-
- vendor_snapshot_static {
- name: "libclang_rt.builtins",
- version: "27",
- target_arch: "arm64",
- vendor: true,
- arch: {
- arm64: {
- src: "libclang_rt.builtins-aarch64-android.a",
- },
- },
- }
-
- vendor_snapshot_static {
- name: "libc++demangle",
- version: "27",
- target_arch: "arm64",
- compile_multilib: "64",
- vendor: true,
- arch: {
- arm64: {
- src: "libc++demangle.a",
- },
- },
- min_sdk_version: "apex_inherit",
- }
-
- vendor_snapshot_static {
- name: "libunwind",
- version: "27",
- target_arch: "arm64",
- compile_multilib: "64",
- vendor: true,
- arch: {
- arm64: {
- src: "libunwind.a",
- },
- },
- min_sdk_version: "apex_inherit",
- }
- `),
- }))
-
- // Should embed the prebuilt VNDK libraries in the apex
- ensureExactContents(t, ctx, "myapex", "android_common_myapex", []string{
- "bin/foo",
- "prebuilts/vndk/libc++.so:lib64/libc++.so",
- "prebuilts/vndk/libvndk.so:lib64/libvndk.so",
- })
-
- // Should link foo with prebuilt libraries (shared/static)
- ldRule := ctx.ModuleForTests("foo", "android_vendor.27_arm64_armv8-a_myapex").Rule("ld")
- android.AssertStringDoesContain(t, "should link to prebuilt llndk", ldRule.Args["libFlags"], "prebuilts/vndk/libllndk.so")
- android.AssertStringDoesContain(t, "should link to prebuilt vndk", ldRule.Args["libFlags"], "prebuilts/vndk/libvndk.so")
- android.AssertStringDoesContain(t, "should link to prebuilt libc++demangle", ldRule.Args["libFlags"], "prebuilts/vndk/libc++demangle.a")
- android.AssertStringDoesContain(t, "should link to prebuilt libunwind", ldRule.Args["libFlags"], "prebuilts/vndk/libunwind.a")
-
- // Should declare the LLNDK library as a "required" external dependency
- manifestRule := ctx.ModuleForTests("myapex", "android_common_myapex").Rule("apexManifestRule")
- requireNativeLibs := names(manifestRule.Args["requireNativeLibs"])
- ensureListContains(t, requireNativeLibs, "libllndk.so")
-}
-
func TestDependenciesInApexManifest(t *testing.T) {
ctx := testApex(t, `
apex {