diff options
author | 2024-12-13 14:10:31 -0800 | |
---|---|---|
committer | 2024-12-13 14:47:21 -0800 | |
commit | fee270187d49304460e1db46c0a29fd0e97a832c (patch) | |
tree | 13f26f974d962b772a5f2d3d295933e2946d8734 /filesystem/filesystem_test.go | |
parent | c6f264854e38c6f4964409902eb20832d764d2d4 (diff) |
Make BuildLinkerConfig run in its own action
We should probably do this change for more parts of the filesystem
RuleBuilder. Moving the linker config action out of the filesystem
rulebuilder allows it to run in parallel with opther actions, and not
rerun every time the filesystem is rebuilt.
Bug: 384091387
Test: Presubmits
Change-Id: Ic7305c555260fb5d9900c6c709b6c81dc0708d2b
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r-- | filesystem/filesystem_test.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index 2dcb23d3f..33cddf87d 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -16,7 +16,6 @@ package filesystem import ( "os" - "strings" "testing" "android/soong/android" @@ -181,11 +180,9 @@ func TestFileSystemFillsLinkerConfigWithStubLibs(t *testing.T) { `) module := result.ModuleForTests("myfilesystem", "android_common") - output := module.Output("out/soong/.intermediates/myfilesystem/android_common/myfilesystem/system/etc/linker.config.pb") + output := module.Output("out/soong/.intermediates/myfilesystem/android_common/linker.config.pb") - fullCommand := output.RuleParams.Command - startIndex := strings.Index(fullCommand, "conv_linker_config") - linkerConfigCommand := fullCommand[startIndex:] + linkerConfigCommand := output.RuleParams.Command android.AssertStringDoesContain(t, "linker.config.pb should have libfoo", linkerConfigCommand, "libfoo.so") @@ -735,7 +732,7 @@ cc_library { } `) - linkerConfigCmd := result.ModuleForTests("myfilesystem", "android_common").Rule("build_filesystem_image").RuleParams.Command + linkerConfigCmd := result.ModuleForTests("myfilesystem", "android_common").Output("out/soong/.intermediates/myfilesystem/android_common/linker.config.pb").RuleParams.Command android.AssertStringDoesContain(t, "Could not find linker.config.json file in cmd", linkerConfigCmd, "conv_linker_config proto --force -s linker.config.json") android.AssertStringDoesContain(t, "Could not find stub in `provideLibs`", linkerConfigCmd, "--key provideLibs --value libfoo_has_stubs.so") } |