summaryrefslogtreecommitdiff
path: root/filesystem/filesystem_test.go
diff options
context:
space:
mode:
author Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-15 14:01:24 -0700
committer Android Build Coastguard Worker <android-build-coastguard-worker@google.com> 2025-03-15 14:01:24 -0700
commitdc320bd27bd8ce9770417b3129e8b5a678302486 (patch)
treed7dc8d3e765db83cafa33d725c8c8b3af2f35cb0 /filesystem/filesystem_test.go
parent3c77f8b28da07ff0e35a64167ffa3713b31b3e08 (diff)
parentaf77fd1025a62585b4689cd2062f18a1f3984ff4 (diff)
Snap for 13221802 from af77fd1025a62585b4689cd2062f18a1f3984ff4 to 25Q2-release
Change-Id: I67d740eb6e355c0a913cc97fec739226f025c17a
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r--filesystem/filesystem_test.go23
1 files changed, 22 insertions, 1 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index 6d0b49016..bf7f5b64b 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -723,26 +723,47 @@ cc_library {
// override_android_* modules implicitly override their base module.
// If both of these are listed in `deps`, the base module should not be installed.
+// Also, required deps should be updated too.
func TestOverrideModulesInDeps(t *testing.T) {
result := fixture.RunTestWithBp(t, `
+ cc_library_shared {
+ name: "libfoo",
+ stl: "none",
+ system_shared_libs: [],
+ }
+ cc_library_shared {
+ name: "libbar",
+ stl: "none",
+ system_shared_libs: [],
+ }
android_filesystem {
name: "myfilesystem",
+ deps: ["myapp"],
+ }
+ android_filesystem {
+ name: "myfilesystem_overridden",
deps: ["myapp", "myoverrideapp"],
}
android_app {
name: "myapp",
platform_apis: true,
+ required: ["libfoo"],
}
override_android_app {
name: "myoverrideapp",
base: "myapp",
+ required: ["libbar"],
}
`)
partition := result.ModuleForTests(t, "myfilesystem", "android_common")
fileList := android.ContentFromFileRuleForTests(t, result.TestContext, partition.Output("fileList"))
- android.AssertStringEquals(t, "filesystem with override app", "app/myoverrideapp/myoverrideapp.apk\n", fileList)
+ android.AssertStringEquals(t, "filesystem without override app", "app/myapp/myapp.apk\nlib64/libfoo.so\n", fileList)
+
+ overriddenPartition := result.ModuleForTests(t, "myfilesystem_overridden", "android_common")
+ overriddenFileList := android.ContentFromFileRuleForTests(t, result.TestContext, overriddenPartition.Output("fileList"))
+ android.AssertStringEquals(t, "filesystem with override app", "app/myoverrideapp/myoverrideapp.apk\nlib64/libbar.so\n", overriddenFileList)
}
func TestRamdiskPartitionSetsDevNodes(t *testing.T) {