summaryrefslogtreecommitdiff
path: root/java/testing.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-09-06 18:41:58 +0000
committer Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> 2024-09-06 18:41:58 +0000
commitace2d9884a9957b3e538f171786a7a5d7392fb82 (patch)
tree8080b098dbbc7fe37407e0075ef38d1477db80ed /java/testing.go
parent9d269b6956939b7faed39a4bb86ce06c0200f000 (diff)
parent219009f60695ba87d382f03f1de59b9f1b6170b2 (diff)
Merge "Make the java static_libs property configurable" into main am: 219009f606
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3254302 Change-Id: I708599b3007151e4e525f5c647f79861d4968923 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'java/testing.go')
-rw-r--r--java/testing.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/java/testing.go b/java/testing.go
index e31e0d2bb..0c79e9f7e 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -633,6 +633,18 @@ func CheckModuleHasDependency(t *testing.T, ctx *android.TestContext, name, vari
return false
}
+// CheckModuleHasDependency returns true if the module depends on the expected dependency.
+func CheckModuleHasDependencyWithTag(t *testing.T, ctx *android.TestContext, name, variant string, desiredTag blueprint.DependencyTag, expected string) bool {
+ module := ctx.ModuleForTests(name, variant).Module()
+ found := false
+ ctx.VisitDirectDepsWithTags(module, func(m blueprint.Module, tag blueprint.DependencyTag) {
+ if tag == desiredTag && m.Name() == expected {
+ found = true
+ }
+ })
+ return found
+}
+
// CheckPlatformBootclasspathModules returns the apex:module pair for the modules depended upon by
// the platform-bootclasspath module.
func CheckPlatformBootclasspathModules(t *testing.T, result *android.TestResult, name string, expected []string) {