diff options
| author | 2024-10-22 20:13:12 +0000 | |
|---|---|---|
| committer | 2024-10-22 20:13:12 +0000 | |
| commit | 25ebc502672abbbe2df0b6efbbc42b5d3983cc69 (patch) | |
| tree | 581924d78a577c3f20b3e6e2a7bebfc7480afdcf /filesystem/filesystem_test.go | |
| parent | 36c0d1b3d14396ea893ab9a5ee243b95d05c025f (diff) | |
| parent | 405f2d449957364873dd9abaa3e5461b2524dc83 (diff) | |
Merge "Use shared variant of dep for packaging" into main
Diffstat (limited to 'filesystem/filesystem_test.go')
| -rw-r--r-- | filesystem/filesystem_test.go | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index 15c4898ea..ab63550ca 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -610,3 +610,22 @@ func TestDoNotPackageCrossPartitionDependencies(t *testing.T) { fileList := android.ContentFromFileRuleForTests(t, result.TestContext, partition.Output("fileList")) android.AssertDeepEquals(t, "filesystem with dependencies on different partition", "bin/binfoo\n", fileList) } + +// If a cc_library is listed in `deps`, and it has a shared and static variant, then the shared variant +// should be installed. +func TestUseSharedVariationOfNativeLib(t *testing.T) { + result := fixture.RunTestWithBp(t, ` + android_filesystem { + name: "myfilesystem", + deps: ["libfoo"], + } + // cc_library will create a static and shared variant. + cc_library { + name: "libfoo", + } + `) + + partition := result.ModuleForTests("myfilesystem", "android_common") + fileList := android.ContentFromFileRuleForTests(t, result.TestContext, partition.Output("fileList")) + android.AssertDeepEquals(t, "cc_library listed in deps", "lib64/libc++.so\nlib64/libc.so\nlib64/libdl.so\nlib64/libfoo.so\nlib64/libm.so\n", fileList) +} |