summaryrefslogtreecommitdiff
path: root/filesystem/filesystem_test.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2024-10-10 17:51:14 +0000
committer Spandan Das <spandandas@google.com> 2024-10-10 23:27:56 +0000
commitc35d6fb14192ea72bae0177ae57a3a1d72384aca (patch)
tree6271ab54031c23dd50d3188011912056f54843e3 /filesystem/filesystem_test.go
parentf2174dfbf8a0a7657de6749442c69769ce5dae19 (diff)
Add erofs support to Soong filesystem modules
Test: go test ./filesystem Bug: 372522486 Change-Id: I57c5a15a225e9e02ebec188d45b640f4185a33c0
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r--filesystem/filesystem_test.go25
1 files changed, 25 insertions, 0 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go
index 8c0d11178..057dcaaff 100644
--- a/filesystem/filesystem_test.go
+++ b/filesystem/filesystem_test.go
@@ -559,3 +559,28 @@ func TestFilterOutUnsupportedArches(t *testing.T) {
}
}
}
+
+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")
+}