diff options
author | 2024-11-18 21:30:22 +0000 | |
---|---|---|
committer | 2024-11-18 21:55:55 +0000 | |
commit | 6c03c8ee70c1412e6b2e2a960081c94cbdf0b45e (patch) | |
tree | ceeca5c551153bde6f4ada4ac6bfac5d81a7322d /filesystem/filesystem_test.go | |
parent | 385f75bfacf3a29949e3acbccd0cbc9baf347ee4 (diff) |
Specify dev nodes list file for ramdisk partition generation
Ramdisk partition requires "-n" argument to be passed when generating
the image file. Given that the value is agnostic to the target product
and is set to a constant value, this is implicitly set internally in
filesystem module.
Test: inspect ramdisk.img build command
Bug: 379190521
Change-Id: I01d0c1bf06e087ab49c71bdb0cfe48a08b9c7fc9
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r-- | filesystem/filesystem_test.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index 7c342cc8c..746e4de74 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -758,3 +758,28 @@ func TestOverrideModulesInDeps(t *testing.T) { fileList := android.ContentFromFileRuleForTests(t, result.TestContext, partition.Output("fileList")) android.AssertStringEquals(t, "filesystem with override app", "app/myoverrideapp/myoverrideapp.apk\n", fileList) } + +func TestRamdiskPartitionSetsDevNodes(t *testing.T) { + result := android.GroupFixturePreparers( + fixture, + android.FixtureMergeMockFs(android.MockFS{ + "ramdisk_node_list": nil, + }), + ).RunTestWithBp(t, ` + android_filesystem { + name: "ramdisk_filesystem", + partition_name: "ramdisk", + } + filegroup { + name: "ramdisk_node_list", + srcs: ["ramdisk_node_list"], + } + `) + + android.AssertBoolEquals( + t, + "Generated ramdisk image expected to depend on \"ramdisk_node_list\" module", + true, + java.CheckModuleHasDependency(t, result.TestContext, "ramdisk_filesystem", "android_common", "ramdisk_node_list"), + ) +} |