Remove extraneous calls to TestingBuildParams.RelativeToTop()

Deprecated the method to try and prevent any other uses being added.

Bug: 183650682
Test: m nothing
Change-Id: Ia6f43851e5a00c9d96af780e3bd21e03175e1a2f
This commit is contained in:
Paul Duffin
2021-03-29 00:42:57 +01:00
parent e8366da1f6
commit a71a67a4f5
9 changed files with 37 additions and 35 deletions

View File

@@ -50,7 +50,7 @@ func TestHiddenAPISingleton(t *testing.T) {
`)
hiddenAPI := result.SingletonForTests("hiddenapi")
hiddenapiRule := hiddenAPI.Rule("hiddenapi").RelativeToTop()
hiddenapiRule := hiddenAPI.Rule("hiddenapi")
want := "--boot-dex=out/soong/.intermediates/foo/android_common/aligned/foo.jar"
android.AssertStringDoesContain(t, "hiddenapi command", hiddenapiRule.RuleParams.Command, want)
}
@@ -145,7 +145,7 @@ func TestHiddenAPISingletonWithPrebuilt(t *testing.T) {
`)
hiddenAPI := result.SingletonForTests("hiddenapi")
hiddenapiRule := hiddenAPI.Rule("hiddenapi").RelativeToTop()
hiddenapiRule := hiddenAPI.Rule("hiddenapi")
want := "--boot-dex=out/soong/.intermediates/foo/android_common/aligned/foo.jar"
android.AssertStringDoesContain(t, "hiddenapi command", hiddenapiRule.RuleParams.Command, want)
}
@@ -169,7 +169,7 @@ func TestHiddenAPISingletonWithPrebuiltUseSource(t *testing.T) {
`)
hiddenAPI := result.SingletonForTests("hiddenapi")
hiddenapiRule := hiddenAPI.Rule("hiddenapi").RelativeToTop()
hiddenapiRule := hiddenAPI.Rule("hiddenapi")
fromSourceJarArg := "--boot-dex=out/soong/.intermediates/foo/android_common/aligned/foo.jar"
android.AssertStringDoesContain(t, "hiddenapi command", hiddenapiRule.RuleParams.Command, fromSourceJarArg)
@@ -196,7 +196,7 @@ func TestHiddenAPISingletonWithPrebuiltOverrideSource(t *testing.T) {
`)
hiddenAPI := result.SingletonForTests("hiddenapi")
hiddenapiRule := hiddenAPI.Rule("hiddenapi").RelativeToTop()
hiddenapiRule := hiddenAPI.Rule("hiddenapi")
prebuiltJarArg := "--boot-dex=out/soong/.intermediates/prebuilt_foo/android_common/dex/foo.jar"
android.AssertStringDoesContain(t, "hiddenapi command", hiddenapiRule.RuleParams.Command, prebuiltJarArg)
@@ -244,7 +244,7 @@ func TestHiddenAPISingletonSdks(t *testing.T) {
).RunTest(t)
hiddenAPI := result.SingletonForTests("hiddenapi")
hiddenapiRule := hiddenAPI.Rule("hiddenapi").RelativeToTop()
hiddenapiRule := hiddenAPI.Rule("hiddenapi")
wantPublicStubs := "--public-stub-classpath=" + generateSdkDexPath(tc.publicStub, tc.unbundledBuild)
android.AssertStringDoesContain(t, "hiddenapi command", hiddenapiRule.RuleParams.Command, wantPublicStubs)
@@ -307,7 +307,7 @@ func TestHiddenAPISingletonWithPrebuiltCsvFile(t *testing.T) {
cpRule := hiddenAPI.Rule("Cp")
actualCpInput := cpRule.BuildParams.Input
actualCpOutput := cpRule.BuildParams.Output
encodeDexRule := foo.Rule("hiddenAPIEncodeDex").RelativeToTop()
encodeDexRule := foo.Rule("hiddenAPIEncodeDex")
actualFlagsCsv := encodeDexRule.BuildParams.Args["flagsCsv"]
android.AssertPathRelativeToTopEquals(t, "hiddenapi cp rule input", expectedCpInput, actualCpInput)