Lines Matching refs:ctx
42 func (m *mutatorTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
43 ctx.Build(pctx, BuildParams{
45 Output: PathForModuleOut(ctx, "output"),
48 m.missingDeps = ctx.GetMissingDependencies()
51 func (m *mutatorTestModule) DepsMutator(ctx BottomUpMutatorContext) {
52 ctx.AddDependency(ctx.Module(), nil, m.props.Deps_missing_deps...)
55 func addMissingDependenciesMutator(ctx TopDownMutatorContext) {
56 ctx.AddMissingDependencies(ctx.Module().(*mutatorTestModule).props.Mutator_missing_deps)
70 FixtureRegisterWithContext(func(ctx RegistrationContext) {
71 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
72 ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) {
73 ctx.TopDown("add_missing_dependencies", addMissingDependenciesMutator)
94 FixtureRegisterWithContext(func(ctx RegistrationContext) {
96 ctx.PreArchMutators(func(ctx RegisterMutatorsContext) {
97 ctx.BottomUp("pre_arch", func(ctx BottomUpMutatorContext) {
98 moduleStrings = append(moduleStrings, ctx.Module().String())
99 ctx.CreateVariations("a", "b")
101 ctx.TopDown("rename_top_down", func(ctx TopDownMutatorContext) {
102 moduleStrings = append(moduleStrings, ctx.Module().String())
103 ctx.Rename(ctx.Module().base().Name() + "_renamed1")
107 ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) {
108 ctx.BottomUp("pre_deps", func(ctx BottomUpMutatorContext) {
109 moduleStrings = append(moduleStrings, ctx.Module().String())
110 ctx.CreateVariations("c", "d")
114 ctx.PostDepsMutators(func(ctx RegisterMutatorsContext) {
115 ctx.BottomUp("post_deps", func(ctx BottomUpMutatorContext) {
116 moduleStrings = append(moduleStrings, ctx.Module().String())
117 ctx.CreateLocalVariations("e", "f")
119 ctx.BottomUp("rename_bottom_up", func(ctx BottomUpMutatorContext) {
120 moduleStrings = append(moduleStrings, ctx.Module().String())
121 ctx.Rename(ctx.Module().base().Name() + "_renamed2")
123 ctx.BottomUp("final", func(ctx BottomUpMutatorContext) {
124 moduleStrings = append(moduleStrings, ctx.Module().String())
128 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
191 FixtureRegisterWithContext(func(ctx RegistrationContext) {
199 ctx.PostDepsMutators(func(ctx RegisterMutatorsContext) {
200 ctx.BottomUp("far_deps_1", func(ctx BottomUpMutatorContext) {
201 if !strings.HasPrefix(ctx.ModuleName(), "common_dep") {
202 ctx.AddFarVariationDependencies([]blueprint.Variation{}, dep1Tag, "common_dep_1")
205 ctx.BottomUp("variant", func(ctx BottomUpMutatorContext) {
206 ctx.CreateLocalVariations("a", "b")
210 ctx.FinalDepsMutators(func(ctx RegisterMutatorsContext) {
211 ctx.BottomUp("far_deps_2", func(ctx BottomUpMutatorContext) {
212 if !strings.HasPrefix(ctx.ModuleName(), "common_dep") {
213 ctx.AddFarVariationDependencies([]blueprint.Variation{}, dep2Tag, "common_dep_2")
216 ctx.BottomUp("final", func(ctx BottomUpMutatorContext) {
217 finalGot[ctx.Module().String()] += 1
218 ctx.VisitDirectDeps(func(mod Module) {
219 finalGot[fmt.Sprintf("%s -> %s", ctx.Module().String(), mod)] += 1
224 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
253 FixtureRegisterWithContext(func(ctx RegistrationContext) {
254 ctx.FinalDepsMutators(func(ctx RegisterMutatorsContext) {
255 ctx.BottomUp("vars", func(ctx BottomUpMutatorContext) {
257 ctx.CreateVariations("a", "b")
259 ctx.BottomUp("local_vars", func(ctx BottomUpMutatorContext) {
261 ctx.CreateLocalVariations("a", "b")
265 ctx.RegisterModuleType("test", mutatorTestModuleFactory)