summaryrefslogtreecommitdiff
path: root/android/testing.go
diff options
context:
space:
mode:
Diffstat (limited to 'android/testing.go')
-rw-r--r--android/testing.go12
1 files changed, 11 insertions, 1 deletions
diff --git a/android/testing.go b/android/testing.go
index 2a9c6584e..5ad7ad07f 100644
--- a/android/testing.go
+++ b/android/testing.go
@@ -495,8 +495,18 @@ func (ctx *TestContext) RegisterSingletonModuleType(name string, factory Singlet
ctx.RegisterModuleType(name, m)
}
+func (ctx *TestContext) RegisterParallelSingletonModuleType(name string, factory SingletonModuleFactory) {
+ s, m := SingletonModuleFactoryAdaptor(name, factory)
+ ctx.RegisterParallelSingletonType(name, s)
+ ctx.RegisterModuleType(name, m)
+}
+
func (ctx *TestContext) RegisterSingletonType(name string, factory SingletonFactory) {
- ctx.singletons = append(ctx.singletons, newSingleton(name, factory))
+ ctx.singletons = append(ctx.singletons, newSingleton(name, factory, false))
+}
+
+func (ctx *TestContext) RegisterParallelSingletonType(name string, factory SingletonFactory) {
+ ctx.singletons = append(ctx.singletons, newSingleton(name, factory, true))
}
func (ctx *TestContext) RegisterPreSingletonType(name string, factory SingletonFactory) {