Build canned_fs_config using RuleBuilder

... in preparation for adding the support for custom canned fs config

Bug: 209971551
Test: m nothing
Change-Id: I7f2576ff99c65bdb6c9ce4ace61bc783eea2f0d4
This commit is contained in:
Jiyong Park
2021-12-13 23:40:17 +09:00
parent 789e5026b4
commit 1b0893eeba
2 changed files with 72 additions and 73 deletions

View File

@@ -2581,22 +2581,21 @@ func TestFilesInSubDir(t *testing.T) {
`)
generateFsRule := ctx.ModuleForTests("myapex", "android_common_myapex_image").Rule("generateFsConfig")
dirs := strings.Split(generateFsRule.Args["exec_paths"], " ")
cmd := generateFsRule.RuleParams.Command
// Ensure that the subdirectories are all listed
ensureListContains(t, dirs, "etc")
ensureListContains(t, dirs, "etc/foo")
ensureListContains(t, dirs, "etc/foo/bar")
ensureListContains(t, dirs, "lib64")
ensureListContains(t, dirs, "lib64/foo")
ensureListContains(t, dirs, "lib64/foo/bar")
ensureListContains(t, dirs, "lib")
ensureListContains(t, dirs, "lib/foo")
ensureListContains(t, dirs, "lib/foo/bar")
ensureListContains(t, dirs, "bin")
ensureListContains(t, dirs, "bin/foo")
ensureListContains(t, dirs, "bin/foo/bar")
ensureContains(t, cmd, "/etc ")
ensureContains(t, cmd, "/etc/foo ")
ensureContains(t, cmd, "/etc/foo/bar ")
ensureContains(t, cmd, "/lib64 ")
ensureContains(t, cmd, "/lib64/foo ")
ensureContains(t, cmd, "/lib64/foo/bar ")
ensureContains(t, cmd, "/lib ")
ensureContains(t, cmd, "/lib/foo ")
ensureContains(t, cmd, "/lib/foo/bar ")
ensureContains(t, cmd, "/bin ")
ensureContains(t, cmd, "/bin/foo ")
ensureContains(t, cmd, "/bin/foo/bar ")
}
func TestFilesInSubDirWhenNativeBridgeEnabled(t *testing.T) {