diff options
| author | 2024-12-03 05:54:04 +0000 | |
|---|---|---|
| committer | 2024-12-03 05:54:04 +0000 | |
| commit | 0674ba0937555bb7564037373a353a529797cad3 (patch) | |
| tree | 72162876bc992dcbd9379afc7808b386f3847515 /filesystem/filesystem_test.go | |
| parent | 077cb63f313ab0654f595ec725208a3727384660 (diff) | |
| parent | d7556eb837c032f523a088e087d6ebeba1075690 (diff) | |
Merge "Support long commands in RuleBuilder" into main
Diffstat (limited to 'filesystem/filesystem_test.go')
| -rw-r--r-- | filesystem/filesystem_test.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/filesystem/filesystem_test.go b/filesystem/filesystem_test.go index 746e4de74..72a52111c 100644 --- a/filesystem/filesystem_test.go +++ b/filesystem/filesystem_test.go @@ -16,6 +16,7 @@ package filesystem import ( "os" + "strings" "testing" "android/soong/android" @@ -182,10 +183,14 @@ func TestFileSystemFillsLinkerConfigWithStubLibs(t *testing.T) { module := result.ModuleForTests("myfilesystem", "android_common") output := module.Output("out/soong/.intermediates/myfilesystem/android_common/root/system/etc/linker.config.pb") + fullCommand := output.RuleParams.Command + startIndex := strings.Index(fullCommand, "conv_linker_config") + linkerConfigCommand := fullCommand[startIndex:] + android.AssertStringDoesContain(t, "linker.config.pb should have libfoo", - output.RuleParams.Command, "libfoo.so") + linkerConfigCommand, "libfoo.so") android.AssertStringDoesNotContain(t, "linker.config.pb should not have libbar", - output.RuleParams.Command, "libbar.so") + linkerConfigCommand, "libbar.so") } func registerComponent(ctx android.RegistrationContext) { |