summaryrefslogtreecommitdiff
path: root/filesystem/filesystem_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem/filesystem_test.go')
-rw-r--r--filesystem/filesystem_test.go9
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) {