From 6c9da044f815719a98fe685419b1edf0cfdd9287 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Sun, 7 Mar 2021 15:44:41 +0000 Subject: [PATCH] Add preparer for test to use AndroidMk Bug: 181070625 Test: m nothing Change-Id: I6b408d44e82d3bac6661bf6b54020c5c4051900e --- android/androidmk.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/android/androidmk.go b/android/androidmk.go index 32d771200..93175670f 100644 --- a/android/androidmk.go +++ b/android/androidmk.go @@ -44,6 +44,14 @@ func RegisterAndroidMkBuildComponents(ctx RegistrationContext) { ctx.RegisterSingletonType("androidmk", AndroidMkSingleton) } +// Enable androidmk support. +// * Register the singleton +// * Configure that we are inside make +var PrepareForTestWithAndroidMk = GroupFixturePreparers( + FixtureRegisterWithContext(RegisterAndroidMkBuildComponents), + FixtureModifyConfig(SetKatiEnabledForTests), +) + // Deprecated: Use AndroidMkEntriesProvider instead, especially if you're not going to use the // Custom function. It's easier to use and test. type AndroidMkDataProvider interface {