From 77980a8bb9e86cbd847181e2f5d53b06a987cae8 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 19 Dec 2019 16:01:36 +0000 Subject: 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 --- java/java_test.go | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index 1f259627e..157dea16d 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -85,15 +85,8 @@ func testContext() *android.TestContext { ctx.RegisterPreSingletonType("sdk_versions", android.SingletonFactoryAdaptor(sdkPreSingletonFactory)) // Register module types and mutators from cc needed for JNI testing - ctx.RegisterModuleType("cc_library", cc.LibraryFactory) - ctx.RegisterModuleType("cc_object", cc.ObjectFactory) - ctx.RegisterModuleType("toolchain_library", cc.ToolchainLibraryFactory) - ctx.RegisterModuleType("llndk_library", cc.LlndkLibraryFactory) + cc.RegisterRequiredBuildComponentsForTest(ctx) ctx.RegisterModuleType("ndk_prebuilt_shared_stl", cc.NdkPrebuiltSharedStlFactory) - ctx.PreDepsMutators(func(ctx android.RegisterMutatorsContext) { - ctx.BottomUp("link", cc.LinkageMutator).Parallel() - ctx.BottomUp("begin", cc.BeginMutator).Parallel() - }) return ctx } -- cgit v1.2.3-59-g8ed1b