diff options
author | 2024-12-02 13:18:58 -0800 | |
---|---|---|
committer | 2024-12-02 17:24:21 -0800 | |
commit | d7556eb837c032f523a088e087d6ebeba1075690 (patch) | |
tree | a2843500a7fa7b4d54c162709e862960f004e65f /filesystem/filesystem_test.go | |
parent | 77f8360ecfa75a13f75d9936f75e4a244acbf4f3 (diff) |
Support long commands in RuleBuilder
If a command exceeds the linux max command line length, it will be put
into a script instead.
Fixes: 380945706
Test: Presubmits
Change-Id: I9bc4b293d6d638b38e7fb11e6c2bc35196306d9f
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) { |