summaryrefslogtreecommitdiff
path: root/sysprop/sysprop_test.go
diff options
context:
space:
mode:
author Paul Duffin <paulduffin@google.com> 2019-12-19 16:01:36 +0000
committer Paul Duffin <paulduffin@google.com> 2019-12-19 19:19:40 +0000
commit77980a8bb9e86cbd847181e2f5d53b06a987cae8 (patch)
tree248af0e0eb71d964afba7e3fbc879a40f6608a02 /sysprop/sysprop_test.go
parent2ccaffd1d7e335bd50e79a850a79f51ba3aba1b1 (diff)
Dedup registration for cc default test config
The cc.GatherRequiredDepsForTest() method returns some default module definitions that are required when using cc module types like cc_library. Previously, the registration of the module types and mutators needed to process those default definitions was duplicated in the test config initialization. This change removes that duplicated code and replaces it with calls to cc.RegisterRequiredBuildComponentsForTest(ctx) which registers all the required build components. Test: m checkbuild Bug: 146540677 Change-Id: I80b6913c5691ff164ce9d308b9e1da24940f2d42
Diffstat (limited to 'sysprop/sysprop_test.go')
-rw-r--r--sysprop/sysprop_test.go10
1 files changed, 1 insertions, 9 deletions
diff --git a/sysprop/sysprop_test.go b/sysprop/sysprop_test.go
index d24262dde..fe9e82a59 100644
--- a/sysprop/sysprop_test.go
+++ b/sysprop/sysprop_test.go
@@ -67,18 +67,10 @@ func testContext(config android.Config) *android.TestContext {
ctx.BottomUp("sysprop_deps", syspropDepsMutator).Parallel()
})
- ctx.RegisterModuleType("cc_library", cc.LibraryFactory)
+ cc.RegisterRequiredBuildComponentsForTest(ctx)
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("link", cc.LinkageMutator).Parallel()
- ctx.BottomUp("vndk", cc.VndkMutator).Parallel()
- ctx.BottomUp("version", cc.VersionMutator).Parallel()
- ctx.BottomUp("begin", cc.BeginMutator).Parallel()
- ctx.BottomUp("sysprop_cc", cc.SyspropMutator).Parallel()
ctx.BottomUp("sysprop_java", java.SyspropMutator).Parallel()
})