Convert test mutators to TransitionMutators
Convert various mutators in tests to TransitionMutators. Bug: 319288033 Flag: EXEMPT refactor Test: all soong tests pass Change-Id: I1da55889c391582a7c825c118c5988ec27820237
This commit is contained in:
@@ -96,12 +96,6 @@ func TestUnusedSingletonModule(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func testVariantSingletonModuleMutator(ctx BottomUpMutatorContext) {
|
||||
if _, ok := ctx.Module().(*testSingletonModule); ok {
|
||||
ctx.CreateVariations("a", "b")
|
||||
}
|
||||
}
|
||||
|
||||
func TestVariantSingletonModule(t *testing.T) {
|
||||
if testing.Short() {
|
||||
t.Skip("test fails with data race enabled")
|
||||
@@ -116,7 +110,11 @@ func TestVariantSingletonModule(t *testing.T) {
|
||||
prepareForSingletonModuleTest,
|
||||
FixtureRegisterWithContext(func(ctx RegistrationContext) {
|
||||
ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) {
|
||||
ctx.BottomUp("test_singleton_module_mutator", testVariantSingletonModuleMutator)
|
||||
ctx.Transition("test_singleton_module_mutator", &testTransitionMutator{
|
||||
split: func(ctx BaseModuleContext) []string {
|
||||
return []string{"a", "b"}
|
||||
},
|
||||
})
|
||||
})
|
||||
}),
|
||||
).
|
||||
|
Reference in New Issue
Block a user