diff options
author | 2024-10-21 13:40:23 +0000 | |
---|---|---|
committer | 2024-10-21 13:40:23 +0000 | |
commit | 74c7c8ecb0127dd49ddb68513c919595a15b0101 (patch) | |
tree | 32b8763ae576810799d2be6990ab5b1e56ed8731 /filesystem/filesystem_test.go | |
parent | 2147eb09bf0536f95135757ab1b054069b2d125d (diff) | |
parent | 69d829a14a5d16300d4191ec2d9edde0e4727908 (diff) |
Merge "Revert^2 "Use a partition packaging spec filter for android_filesystem"" into main
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r-- | filesystem/filesystem_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index 057dcaaff..1e508364c 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -584,3 +584,28 @@ func TestErofsPartition(t *testing.T) { android.AssertStringDoesContain(t, "erofs fs type compress hint", buildImageConfig, "erofs_default_compress_hints=compress_hints.txt") android.AssertStringDoesContain(t, "erofs fs type sparse", buildImageConfig, "erofs_sparse_flag=-s") } + +// If a system_ext/ module depends on system/ module, the dependency should *not* +// be installed in system_ext/ +func TestDoNotPackageCrossPartitionDependencies(t *testing.T) { + result := fixture.RunTestWithBp(t, ` + android_filesystem { + name: "myfilesystem", + deps: ["binfoo"], + partition_type: "system_ext", + } + + cc_binary { + name: "binfoo", + shared_libs: ["libfoo"], + system_ext_specific: true, + } + cc_library_shared { + name: "libfoo", // installed in system/ + } + `) + + partition := result.ModuleForTests("myfilesystem", "android_common") + fileList := android.ContentFromFileRuleForTests(t, result.TestContext, partition.Output("fileList")) + android.AssertDeepEquals(t, "filesystem with dependencies on different partition", "bin/binfoo\n", fileList) +} |