diff options
author | 2021-03-20 00:36:14 +0000 | |
---|---|---|
committer | 2021-03-22 18:31:53 +0000 | |
commit | 30ac3e7ca75106d7f883558c46501296d4bffcfc (patch) | |
tree | 8fb0fadf5f85ff592c7ff56bdfb0a915d9ffa1b1 /android/namespace_test.go | |
parent | ff2aa69a86e46429255ed812b2796a89635b9f26 (diff) |
Remove uses of FixtureFactory from android package
Bug: 183235980
Test: m nothing
Change-Id: I72898ada020ee1a73fd534c61afb5c22fa00c1e5
Diffstat (limited to 'android/namespace_test.go')
-rw-r--r-- | android/namespace_test.go | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/android/namespace_test.go b/android/namespace_test.go index 1caf5a87f..dea287d84 100644 --- a/android/namespace_test.go +++ b/android/namespace_test.go @@ -633,21 +633,21 @@ func mockFiles(bps map[string]string) (files map[string][]byte) { } func setupTestFromFiles(t *testing.T, bps MockFS) (ctx *TestContext, errs []error) { - result := emptyTestFixtureFactory. + result := GroupFixturePreparers( + FixtureModifyContext(func(ctx *TestContext) { + ctx.RegisterModuleType("test_module", newTestModule) + ctx.RegisterModuleType("soong_namespace", NamespaceFactory) + ctx.Context.RegisterModuleType("blueprint_test_module", newBlueprintTestModule) + ctx.PreArchMutators(RegisterNamespaceMutator) + ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) { + ctx.BottomUp("rename", renameMutator) + }) + }), + bps.AddToFixture(), + ). // Ignore errors for now so tests can check them later. ExtendWithErrorHandler(FixtureIgnoreErrors). - RunTest(t, - FixtureModifyContext(func(ctx *TestContext) { - ctx.RegisterModuleType("test_module", newTestModule) - ctx.RegisterModuleType("soong_namespace", NamespaceFactory) - ctx.Context.RegisterModuleType("blueprint_test_module", newBlueprintTestModule) - ctx.PreArchMutators(RegisterNamespaceMutator) - ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) { - ctx.BottomUp("rename", renameMutator) - }) - }), - bps.AddToFixture(), - ) + RunTest(t) return result.TestContext, result.Errs } |