From c35d6fb14192ea72bae0177ae57a3a1d72384aca Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Thu, 10 Oct 2024 17:51:14 +0000 Subject: Add erofs support to Soong filesystem modules Test: go test ./filesystem Bug: 372522486 Change-Id: I57c5a15a225e9e02ebec188d45b640f4185a33c0 --- filesystem/filesystem_test.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'filesystem/filesystem_test.go') 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") +} -- cgit v1.2.3-59-g8ed1b