summaryrefslogtreecommitdiff
path: root/filesystem/filesystem_test.go
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-12-13 16:13:43 -0800
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-12-13 16:13:43 -0800
commit322c4382951618e134e961507f07a68c99428f17 (patch)
tree6dd46e1b36836be8af923f44386bf84da3920f79 /filesystem/filesystem_test.go
parent71340584f8d48d10578731c0b2dadfd178055ad6 (diff)
parentfee270187d49304460e1db46c0a29fd0e97a832c (diff)
Merge "Make BuildLinkerConfig run in its own action" into main
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r--filesystem/filesystem_test.go9
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")
}