diff options
author | 2024-05-14 05:04:27 +0000 | |
---|---|---|
committer | 2024-05-14 05:04:27 +0000 | |
commit | 635e1218bddb8274c520fc59a222e619e89b0d65 (patch) | |
tree | 044c6f81c368910abe64bbe582b2c088a41645b1 /filesystem/filesystem_test.go | |
parent | c3e6594a0d655e3af3411f4e135acdca926c1b66 (diff) | |
parent | c4b1d5570776b5ec5ccc322cb0a5f18bc62f630f (diff) |
Merge "Fix: required deps from native module to phony module is respected" into main
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r-- | filesystem/filesystem_test.go | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index acd481352..861918f16 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -465,3 +465,35 @@ func TestPreventDuplicatedEntries(t *testing.T) { } `) } + +func TestTrackPhonyAsRequiredDep(t *testing.T) { + result := fixture.RunTestWithBp(t, ` + android_filesystem { + name: "fs", + deps: ["foo"], + } + + cc_binary { + name: "foo", + required: ["phony"], + } + + phony { + name: "phony", + required: ["libbar"], + } + + cc_library { + name: "libbar", + } + `) + + fs := result.ModuleForTests("fs", "android_common").Module().(*filesystem) + expected := []string{ + "bin/foo", + "lib64/libbar.so", + } + for _, e := range expected { + android.AssertStringListContains(t, "missing entry", fs.entries, e) + } +} |