summaryrefslogtreecommitdiff
path: root/sysprop/sysprop_test.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2019-11-22 15:25:03 -0800
committer Colin Cross <ccross@android.com> 2019-11-25 10:59:44 -0800
commit4b49b768a2cb7d455aea5347d27d9045b8c481fa (patch)
treea8b5167209d668a3c4d97357e00528982d24cc31 /sysprop/sysprop_test.go
parent62835fd85fc175f71a9512eedbc0e27cbe2ff30b (diff)
Make TestContext.RegisterModuleType take an android.ModuleFactory
Avoid having to pass ModuleFactoryAdaptor to every call to RegisterModuleType in a test by wrapping RegisterModuleType. Test: all soong tests Change-Id: If8847d16487de0479cc3020b728256922b3cadba
Diffstat (limited to 'sysprop/sysprop_test.go')
-rw-r--r--sysprop/sysprop_test.go20
1 files changed, 10 insertions, 10 deletions
diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go
index 6b4337a04..80dcb7217 100644
--- a/sysprop/sysprop_test.go
+++ b/sysprop/sysprop_test.go
@@ -56,9 +56,9 @@ func testContext(config android.Config, bp string,
fs map[string][]byte) *android.TestContext {
ctx := android.NewTestArchContext()
- ctx.RegisterModuleType("android_app", android.ModuleFactoryAdaptor(java.AndroidAppFactory))
- ctx.RegisterModuleType("java_library", android.ModuleFactoryAdaptor(java.LibraryFactory))
- ctx.RegisterModuleType("java_system_modules", android.ModuleFactoryAdaptor(java.SystemModulesFactory))
+ ctx.RegisterModuleType("android_app", java.AndroidAppFactory)
+ ctx.RegisterModuleType("java_library", java.LibraryFactory)
+ ctx.RegisterModuleType("java_system_modules", java.SystemModulesFactory)
ctx.PreArchMutators(android.RegisterPrebuiltsPreArchMutators)
ctx.PreArchMutators(android.RegisterPrebuiltsPostDepsMutators)
ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
@@ -66,12 +66,12 @@ func testContext(config android.Config, bp string,
ctx.BottomUp("sysprop_deps", syspropDepsMutator).Parallel()
})
- ctx.RegisterModuleType("cc_library", android.ModuleFactoryAdaptor(cc.LibraryFactory))
- ctx.RegisterModuleType("cc_library_headers", android.ModuleFactoryAdaptor(cc.LibraryHeaderFactory))
- ctx.RegisterModuleType("cc_library_static", android.ModuleFactoryAdaptor(cc.LibraryFactory))
- ctx.RegisterModuleType("cc_object", android.ModuleFactoryAdaptor(cc.ObjectFactory))
- ctx.RegisterModuleType("llndk_library", android.ModuleFactoryAdaptor(cc.LlndkLibraryFactory))
- ctx.RegisterModuleType("toolchain_library", android.ModuleFactoryAdaptor(cc.ToolchainLibraryFactory))
+ ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
+ ctx.RegisterModuleType("cc_library_headers", cc.LibraryHeaderFactory)
+ ctx.RegisterModuleType("cc_library_static", cc.LibraryFactory)
+ ctx.RegisterModuleType("cc_object", cc.ObjectFactory)
+ ctx.RegisterModuleType("llndk_library", cc.LlndkLibraryFactory)
+ ctx.RegisterModuleType("toolchain_library", cc.ToolchainLibraryFactory)
ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {
ctx.BottomUp("image", cc.ImageMutator).Parallel()
ctx.BottomUp("link", cc.LinkageMutator).Parallel()
@@ -81,7 +81,7 @@ func testContext(config android.Config, bp string,
ctx.BottomUp("sysprop", cc.SyspropMutator).Parallel()
})
- ctx.RegisterModuleType("sysprop_library", android.ModuleFactoryAdaptor(syspropLibraryFactory))
+ ctx.RegisterModuleType("sysprop_library", syspropLibraryFactory)
ctx.Register()