From 06fa588d1ae8b9961549a676072807da75392c73 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 29 Oct 2020 18:21:38 -0700 Subject: Store SingletonMakeVarsProviders in the config Store SingletonMakeVarsProviders in the config instead of a global variable to avoid races between tests running in parallel. Test: all soong tests Change-Id: I2ab64f368b5ac673fd985399d4421ed018abc562 --- java/java_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'java/java_test.go') diff --git a/java/java_test.go b/java/java_test.go index 87d6ebbd4..5cc97b38e 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -92,8 +92,8 @@ func testContext(config android.Config) *android.TestContext { ctx.PreDepsMutators(python.RegisterPythonPreDepsMutators) ctx.PostDepsMutators(android.RegisterOverridePostDepsMutators) - ctx.RegisterPreSingletonType("overlay", android.SingletonFactoryAdaptor(OverlaySingletonFactory)) - ctx.RegisterPreSingletonType("sdk_versions", android.SingletonFactoryAdaptor(sdkPreSingletonFactory)) + ctx.RegisterPreSingletonType("overlay", android.SingletonFactoryAdaptor(ctx.Context, OverlaySingletonFactory)) + ctx.RegisterPreSingletonType("sdk_versions", android.SingletonFactoryAdaptor(ctx.Context, sdkPreSingletonFactory)) android.RegisterPrebuiltMutators(ctx) -- cgit v1.2.3-59-g8ed1b