summaryrefslogtreecommitdiff
path: root/java/testing.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-08-28 11:55:52 -0700
committer Cole Faust <colefaust@google.com> 2024-09-05 14:16:37 -0700
commitb749347fa5cc9cd4018a8ebae0b6df37c2afa70e (patch)
tree4facf258db0310cd1915a3d18217b5f19fccc55a /java/testing.go
parentd18adf146f6a5f8acea1ad30e50aed24235c72c7 (diff)
Make the java static_libs property configurable
Bug: 362579941 Test: m nothing --no-skip-soong-tests Change-Id: Iccc93cf14753aae1adb26c6eedd00aabf1c2f6a6
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 03dcee667..ab4ad6d64 100644
--- a/java/testing.go
+++ b/java/testing.go
@@ -632,6 +632,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) {