From afdd4061ee38966019583d692676a41509555d4e Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Tue, 30 Mar 2021 19:44:07 +0100 Subject: [PATCH] Rename OptionalPath.RelativeToPath -> RelativeToTop Bug: 183650682 Test: m nothing Change-Id: I95239c2273e715e8c4c15a4a02967e01f6913234 --- android/paths.go | 6 +++--- apex/apex_test.go | 2 +- cc/proto_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/android/paths.go b/android/paths.go index db9e06a13..ba1ab1138 100644 --- a/android/paths.go +++ b/android/paths.go @@ -286,9 +286,9 @@ func (p OptionalPath) Path() Path { return p.path } -// RelativeToPath returns an OptionalPath with the path that was embedded having been replaced by -// the result of calling Path.RelativeToPath on it. -func (p OptionalPath) RelativeToPath() OptionalPath { +// RelativeToTop returns an OptionalPath with the path that was embedded having been replaced by the +// result of calling Path.RelativeToTop on it. +func (p OptionalPath) RelativeToTop() OptionalPath { if !p.valid { return p } diff --git a/apex/apex_test.go b/apex/apex_test.go index 92f57c680..407faa1a8 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -5066,7 +5066,7 @@ func TestApexWithApps(t *testing.T) { } // JNI libraries including transitive deps are for _, jni := range []string{"libjni", "libfoo"} { - jniOutput := ctx.ModuleForTests(jni, "android_arm64_armv8-a_sdk_shared_apex10000").Module().(*cc.Module).OutputFile().RelativeToPath() + jniOutput := ctx.ModuleForTests(jni, "android_arm64_armv8-a_sdk_shared_apex10000").Module().(*cc.Module).OutputFile().RelativeToTop() // ... embedded inside APK (jnilibs.zip) ensureListContains(t, appZipRule.Implicits.Strings(), jniOutput.String()) // ... and not directly inside the APEX diff --git a/cc/proto_test.go b/cc/proto_test.go index 3d636fb46..b9c89c744 100644 --- a/cc/proto_test.go +++ b/cc/proto_test.go @@ -61,7 +61,7 @@ func TestProto(t *testing.T) { t.Errorf("expected %q in %q", w, cmd) } - foobarPath := foobar.Module().(android.HostToolProvider).HostToolPath().RelativeToPath().String() + foobarPath := foobar.Module().(android.HostToolProvider).HostToolPath().RelativeToTop().String() if w := "--plugin=protoc-gen-foobar=" + foobarPath; !strings.Contains(cmd, w) { t.Errorf("expected %q in %q", w, cmd)