diff options
author | 2024-05-13 16:47:30 +0900 | |
---|---|---|
committer | 2024-05-13 16:47:30 +0900 | |
commit | c4b1d5570776b5ec5ccc322cb0a5f18bc62f630f (patch) | |
tree | 18d9efdb5e8accd908e6ff996c0be3de78cb8259 /filesystem/filesystem_test.go | |
parent | b544a8b9ecff44f3bcfdf426dbd0a5f47b4801ac (diff) |
Fix: required deps from native module to phony module is respected
This change fixes a bug that required deps from native module to phony
module was ignored. It happened because addRequireDeps incorrectly
thought that both are native modules with different bitness (32->64),
which isn't.
Fix this by doing the bitness check only when both the current module
and the required module are native modules.
Bug: N/A
Test: go test ./... under build/soong/filesystem
Change-Id: I494ebc47e29001f174fa44d72809041f8ceffb0b
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) + } +} |