diff options
author | 2023-12-20 01:00:27 +0000 | |
---|---|---|
committer | 2023-12-20 01:00:27 +0000 | |
commit | a4cca85eeabdb2f7e35f447936c449a345428d5a (patch) | |
tree | 18967296dbec01a63f79d0048964808352197de8 /android/testing.go | |
parent | e87e278086e8add5b3cc8be36e861de4fef54280 (diff) | |
parent | 84b68c90ae68434f58e866e26efd3b25ce4d4338 (diff) |
Merge "Revert "Remove non-generic provider APIs"" into main
Diffstat (limited to 'android/testing.go')
-rw-r--r-- | android/testing.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/android/testing.go b/android/testing.go index 3d0300a01..39a268b23 100644 --- a/android/testing.go +++ b/android/testing.go @@ -203,6 +203,16 @@ func (ctx *TestContext) HardCodedPreArchMutators(f RegisterMutatorFunc) { ctx.PreArchMutators(f) } +func (ctx *TestContext) ModuleProvider(m blueprint.Module, p blueprint.AnyProviderKey) any { + value, _ := ctx.Context.ModuleProvider(m, p) + return value +} + +func (ctx *TestContext) ModuleHasProvider(m blueprint.Module, p blueprint.AnyProviderKey) bool { + _, ok := ctx.Context.ModuleProvider(m, p) + return ok +} + func (ctx *TestContext) moduleProvider(m blueprint.Module, p blueprint.AnyProviderKey) (any, bool) { return ctx.Context.ModuleProvider(m, p) } |