summaryrefslogtreecommitdiff
path: root/android/testing.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2021-01-12 20:43:39 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2021-01-12 20:43:39 +0000
commit2bcb4940bbda88b4142d2db17208c5aa62f2d7dc (patch)
tree9371fa4d9b7a9495bcd1469a2dd8ad7a187454ae /android/testing.go
parente7c39a5da444701fafdf89a1c4c40c71e72ea3df (diff)
parentb5f6fa678dbb3ee08b33941263821a26eacf4255 (diff)
Merge changes Ib29ede45,I1b2bfdfb
* changes: Create LLNDK vendor variants when DeviceVndkVersion is not set Add a new SingletonModule type
Diffstat (limited to 'android/testing.go')
-rw-r--r--android/testing.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/android/testing.go b/android/testing.go
index 6539063bc..a66b1e19f 100644
--- a/android/testing.go
+++ b/android/testing.go
@@ -103,6 +103,12 @@ func (ctx *TestContext) RegisterModuleType(name string, factory ModuleFactory) {
ctx.Context.RegisterModuleType(name, ModuleFactoryAdaptor(factory))
}
+func (ctx *TestContext) RegisterSingletonModuleType(name string, factory SingletonModuleFactory) {
+ s, m := SingletonModuleFactoryAdaptor(name, factory)
+ ctx.RegisterSingletonType(name, s)
+ ctx.RegisterModuleType(name, m)
+}
+
func (ctx *TestContext) RegisterSingletonType(name string, factory SingletonFactory) {
ctx.Context.RegisterSingletonType(name, SingletonFactoryAdaptor(ctx.Context, factory))
}