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
diff --git a/android/singleton_module_test.go b/android/singleton_module_test.go
index 3b1bf39..3b8c6b2 100644
--- a/android/singleton_module_test.go
+++ b/android/singleton_module_test.go
@@ -96,12 +96,6 @@
}
}
-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 @@
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"}
+ },
+ })
})
}),
).