Make testSdkResult compatible with android.TestResult
This change makes it easier to switch the sdk package over to using the new fixture mechanism by removing inconsistencies between the testSdkResult and TestResult structures. Bug: 181070625 Test: m nothing Change-Id: Ic4c06e08ea5060fd09123f2ca65580e18b4d2ef6
This commit is contained in:
@@ -125,7 +125,7 @@ func TestSdkDependsOnSourceEvenWhenPrebuiltPreferred(t *testing.T) {
|
||||
`)
|
||||
|
||||
// Make sure that the mysdk module depends on "sdkmember" and not "prebuilt_sdkmember".
|
||||
java.CheckModuleDependencies(t, result.ctx, "mysdk", "android_common", []string{"sdkmember"})
|
||||
java.CheckModuleDependencies(t, result.TestContext, "mysdk", "android_common", []string{"sdkmember"})
|
||||
|
||||
result.CheckSnapshot("mysdk", "",
|
||||
checkAndroidBpContents(`// This is auto-generated. DO NOT EDIT.
|
||||
@@ -224,11 +224,11 @@ func TestBasicSdkWithJavaLibrary(t *testing.T) {
|
||||
}
|
||||
`)
|
||||
|
||||
sdkMemberV1 := result.ctx.ModuleForTests("sdkmember_mysdk_1", "android_common").Rule("combineJar").Output
|
||||
sdkMemberV2 := result.ctx.ModuleForTests("sdkmember_mysdk_2", "android_common").Rule("combineJar").Output
|
||||
sdkMemberV1 := result.ModuleForTests("sdkmember_mysdk_1", "android_common").Rule("combineJar").Output
|
||||
sdkMemberV2 := result.ModuleForTests("sdkmember_mysdk_2", "android_common").Rule("combineJar").Output
|
||||
|
||||
javalibForMyApex := result.ctx.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_1")
|
||||
javalibForMyApex2 := result.ctx.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_2")
|
||||
javalibForMyApex := result.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_1")
|
||||
javalibForMyApex2 := result.ModuleForTests("myjavalib", "android_common_apex10000_mysdk_2")
|
||||
|
||||
// Depending on the uses_sdks value, different libs are linked
|
||||
ensureListContains(t, pathsToStrings(javalibForMyApex.Rule("javac").Implicits), sdkMemberV1.String())
|
||||
|
Reference in New Issue
Block a user