Add erofs support to Soong filesystem modules
Test: go test ./filesystem
Bug: 372522486
Change-Id: I57c5a15a225e9e02ebec188d45b640f4185a33c0
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index 8c0d111..057dcaa 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -559,3 +559,28 @@
}
}
}
+
+func TestErofsPartition(t *testing.T) {
+ result := fixture.RunTestWithBp(t, `
+ android_filesystem {
+ name: "erofs_partition",
+ type: "erofs",
+ erofs: {
+ compressor: "lz4hc,9",
+ compress_hints: "compress_hints.txt",
+ },
+ deps: ["binfoo"],
+ }
+
+ cc_binary {
+ name: "binfoo",
+ }
+ `)
+
+ partition := result.ModuleForTests("erofs_partition", "android_common")
+ buildImageConfig := android.ContentFromFileRuleForTests(t, result.TestContext, partition.Output("prop"))
+ android.AssertStringDoesContain(t, "erofs fs type", buildImageConfig, "fs_type=erofs")
+ android.AssertStringDoesContain(t, "erofs fs type compress algorithm", buildImageConfig, "erofs_default_compressor=lz4hc,9")
+ 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")
+}