summaryrefslogtreecommitdiff
path: root/filesystem/filesystem_test.go
diff options
context:
space:
mode:
author Jiyong Park <jiyong@google.com> 2024-04-05 18:13:33 +0900
committer Jiyong Park <jiyong@google.com> 2024-04-09 11:26:15 +0900
commitf46b1af96993ed4a92cf32aba289b7f2decb9811 (patch)
tree543dc55dda1a1b959974d6b1305b7d78d500a2a4 /filesystem/filesystem_test.go
parentfe66e137144bb586fa0d51bef2ba2b52d69402e9 (diff)
android_filesystem_defaults and visibility rule
android_systemimage_defaults is deleted and android_filesystem_defaults is created so that we can have defaults not only for android_system_image, but also all android_filesystem modules and its derivatives. Also, change adds a check which ensures that the partition_type of the filesystem and its defaults are the same. Bug: 330665150 Test: m Change-Id: If635c794534ed89d264eaf7dfc406a8245b8e9f0
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r--filesystem/filesystem_test.go24
1 files changed, 23 insertions, 1 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index 5c780f874..9b26cf6eb 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -367,7 +367,7 @@ func TestFileSystemWithCoverageVariants(t *testing.T) {
func TestSystemImageDefaults(t *testing.T) {
result := fixture.RunTestWithBp(t, `
- android_system_image_defaults {
+ android_filesystem_defaults {
name: "defaults",
multilib: {
common: {
@@ -433,3 +433,25 @@ func TestSystemImageDefaults(t *testing.T) {
android.AssertStringListContains(t, "missing entry", fs.entries, e)
}
}
+
+func TestInconsistentPartitionTypesInDefaults(t *testing.T) {
+ fixture.ExtendWithErrorHandler(android.FixtureExpectsOneErrorPattern(
+ "doesn't match with the partition type")).
+ RunTestWithBp(t, `
+ android_filesystem_defaults {
+ name: "system_ext_def",
+ partition_type: "system_ext",
+ }
+
+ android_filesystem_defaults {
+ name: "system_def",
+ partition_type: "system",
+ defaults: ["system_ext_def"],
+ }
+
+ android_system_image {
+ name: "system",
+ defaults: ["system_def"],
+ }
+ `)
+}