Loading rust/test.go +9 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ package rust import ( "path/filepath" "github.com/google/blueprint/proptools" "android/soong/android" Loading Loading @@ -151,9 +153,15 @@ func (test *testDecorator) install(ctx ModuleContext) { ctx.ModuleErrorf("data_lib %q is not a linkable module", depName) } if linkableDep.OutputFile().Valid() { // Copy the output in "lib[64]" so that it's compatible with // the default rpath values. libDir := "lib" if linkableDep.Target().Arch.ArchType.Multilib == "lib64" { libDir = "lib64" } test.data = append(test.data, android.DataPath{SrcPath: linkableDep.OutputFile().Path(), RelativeInstallPath: linkableDep.RelativeInstallPath()}) RelativeInstallPath: filepath.Join(libDir, linkableDep.RelativeInstallPath())}) } }) Loading rust/test_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -187,12 +187,12 @@ func TestDataLibsRelativeInstallPath(t *testing.T) { t.Errorf("expected test output file to be 'main_test', but was '%s'", outputPath) } entries := android.AndroidMkEntriesForTest(t, ctx, module)[0] if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][0], ":test_lib.so:foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:test_lib.so:foo/bar/baz`,"+ if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][0], ":test_lib.so:lib64/foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:test_lib.so:lib64/foo/bar/baz`,"+ " but was '%s'", entries.EntryMap["LOCAL_TEST_DATA"][0]) } if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][1], ":librust_test_lib.so:foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:librust_test_lib.so:foo/bar/baz`,"+ if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][1], ":librust_test_lib.so:lib64/foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:librust_test_lib.so:lib64/foo/bar/baz`,"+ " but was '%s'", entries.EntryMap["LOCAL_TEST_DATA"][1]) } if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][2], ":rusty:foo/bar/baz") { Loading Loading
rust/test.go +9 −1 Original line number Diff line number Diff line Loading @@ -15,6 +15,8 @@ package rust import ( "path/filepath" "github.com/google/blueprint/proptools" "android/soong/android" Loading Loading @@ -151,9 +153,15 @@ func (test *testDecorator) install(ctx ModuleContext) { ctx.ModuleErrorf("data_lib %q is not a linkable module", depName) } if linkableDep.OutputFile().Valid() { // Copy the output in "lib[64]" so that it's compatible with // the default rpath values. libDir := "lib" if linkableDep.Target().Arch.ArchType.Multilib == "lib64" { libDir = "lib64" } test.data = append(test.data, android.DataPath{SrcPath: linkableDep.OutputFile().Path(), RelativeInstallPath: linkableDep.RelativeInstallPath()}) RelativeInstallPath: filepath.Join(libDir, linkableDep.RelativeInstallPath())}) } }) Loading
rust/test_test.go +4 −4 Original line number Diff line number Diff line Loading @@ -187,12 +187,12 @@ func TestDataLibsRelativeInstallPath(t *testing.T) { t.Errorf("expected test output file to be 'main_test', but was '%s'", outputPath) } entries := android.AndroidMkEntriesForTest(t, ctx, module)[0] if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][0], ":test_lib.so:foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:test_lib.so:foo/bar/baz`,"+ if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][0], ":test_lib.so:lib64/foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:test_lib.so:lib64/foo/bar/baz`,"+ " but was '%s'", entries.EntryMap["LOCAL_TEST_DATA"][0]) } if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][1], ":librust_test_lib.so:foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:librust_test_lib.so:foo/bar/baz`,"+ if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][1], ":librust_test_lib.so:lib64/foo/bar/baz") { t.Errorf("expected LOCAL_TEST_DATA to end with `:librust_test_lib.so:lib64/foo/bar/baz`,"+ " but was '%s'", entries.EntryMap["LOCAL_TEST_DATA"][1]) } if !strings.HasSuffix(entries.EntryMap["LOCAL_TEST_DATA"][2], ":rusty:foo/bar/baz") { Loading