summaryrefslogtreecommitdiff
path: root/java/testing.go
diff options
context:
space:
mode:
author satayev <satayev@google.com> 2021-06-15 17:49:10 +0100
committer satayev <satayev@google.com> 2021-06-22 20:03:54 +0100
commitb30905019f3e5839411fe119edcf001c1505d118 (patch)
tree43260a3f771bdf5faad3e1807275791e7eca3bf5 /java/testing.go
parentf93d38835cb1e52034a1da83067bd3622418aa03 (diff)
Append platform classpath proto configs with missing apex jars.
Any apex classpath fragment that doesn't generate its own classpaths proto, must still propagate it's boot jars for the platform classpath fragment to include for complete CLASSPATH variables on device. Bug: 191127295 Test: atest CtsClasspathsTestCases derive_classpath_test Change-Id: I93687f69006741fcd66eb6e04891a4b4bbcc3b47
Diffstat (limited to 'java/testing.go')
-rw-r--r--java/testing.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/java/testing.go b/java/testing.go
index 7b452f762..c3803c8d4 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -363,6 +363,17 @@ func CheckPlatformBootclasspathModules(t *testing.T, result *android.TestResult,
android.AssertDeepEquals(t, fmt.Sprintf("%s modules", "platform-bootclasspath"), expected, pairs)
}
+func CheckClasspathFragmentProtoContentInfoProvider(t *testing.T, result *android.TestResult, generated bool, contents, outputFilename, installDir string) {
+ t.Helper()
+ p := result.Module("platform-bootclasspath", "android_common").(*platformBootclasspathModule)
+ info := result.ModuleProvider(p, ClasspathFragmentProtoContentInfoProvider).(ClasspathFragmentProtoContentInfo)
+
+ android.AssertBoolEquals(t, "classpath proto generated", generated, info.ClasspathFragmentProtoGenerated)
+ android.AssertStringEquals(t, "classpath proto contents", contents, info.ClasspathFragmentProtoContents.String())
+ android.AssertStringEquals(t, "output filepath", outputFilename, info.ClasspathFragmentProtoOutput.Base())
+ android.AssertPathRelativeToTopEquals(t, "install filepath", installDir, info.ClasspathFragmentProtoInstallDir)
+}
+
// ApexNamePairsFromModules returns the apex:module pair for the supplied modules.
func ApexNamePairsFromModules(ctx *android.TestContext, modules []android.Module) []string {
pairs := []string{}