From 021f4e525f987baa3a0b934084a8d49ed4ef00ec Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 30 Jul 2020 16:04:17 +0100 Subject: Fix prebuilt mutator ordering in tests Previously, the prebuilt mutators were added by the cc.RegisterRequiredBuildComponentsForTest() function as a convenience but unfortunately it lead to some of the mutators being in a different order in the tests than in the normal build. This change: * Extracts the RegisterPrebuiltMutators() call from cc.RegisterRequiredBuildComponentsForTest() * Makes sure that the prebuilt mutators are registered before the visibility gatherer and enforcer mutators. Bug: 162505935 Test: m nothing Change-Id: I7d959b558200b502f0a5e4653c41ea01414e142a --- java/java_test.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index 582ebe945..41f57f2df 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -96,6 +96,8 @@ func testContext() *android.TestContext { ctx.RegisterPreSingletonType("overlay", android.SingletonFactoryAdaptor(OverlaySingletonFactory)) ctx.RegisterPreSingletonType("sdk_versions", android.SingletonFactoryAdaptor(sdkPreSingletonFactory)) + android.RegisterPrebuiltMutators(ctx) + // Register module types and mutators from cc needed for JNI testing cc.RegisterRequiredBuildComponentsForTest(ctx) -- cgit v1.2.3-59-g8ed1b