Lines Matching refs:ctx

44 func (m *mutatorTestModule) GenerateAndroidBuildActions(ctx ModuleContext) {
45 ctx.Build(pctx, BuildParams{
47 Output: PathForModuleOut(ctx, "output"),
50 m.missingDeps = ctx.GetMissingDependencies()
53 func (m *mutatorTestModule) DepsMutator(ctx BottomUpMutatorContext) {
54 ctx.AddDependency(ctx.Module(), nil, m.props.Deps_missing_deps...)
57 func addMissingDependenciesMutator(ctx TopDownMutatorContext) {
58 ctx.AddMissingDependencies(ctx.Module().(*mutatorTestModule).props.Mutator_missing_deps)
73 ctx := NewTestContext()
74 ctx.SetAllowMissingDependencies(true)
76 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
77 ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) {
78 ctx.TopDown("add_missing_dependencies", addMissingDependenciesMutator)
81 ctx.Register(config)
82 _, errs := ctx.ParseFileList(".", []string{"Android.bp"})
84 _, errs = ctx.PrepareBuildActions(config)
87 foo := ctx.ModuleForTests("foo", "").Module().(*mutatorTestModule)
95 ctx := NewTestContext()
99 ctx.PreArchMutators(func(ctx RegisterMutatorsContext) {
100 ctx.BottomUp("pre_arch", func(ctx BottomUpMutatorContext) {
101 moduleStrings = append(moduleStrings, ctx.Module().String())
102 ctx.CreateVariations("a", "b")
104 ctx.TopDown("rename_top_down", func(ctx TopDownMutatorContext) {
105 moduleStrings = append(moduleStrings, ctx.Module().String())
106 ctx.Rename(ctx.Module().base().Name() + "_renamed1")
110 ctx.PreDepsMutators(func(ctx RegisterMutatorsContext) {
111 ctx.BottomUp("pre_deps", func(ctx BottomUpMutatorContext) {
112 moduleStrings = append(moduleStrings, ctx.Module().String())
113 ctx.CreateVariations("c", "d")
117 ctx.PostDepsMutators(func(ctx RegisterMutatorsContext) {
118 ctx.BottomUp("post_deps", func(ctx BottomUpMutatorContext) {
119 moduleStrings = append(moduleStrings, ctx.Module().String())
120 ctx.CreateLocalVariations("e", "f")
122 ctx.BottomUp("rename_bottom_up", func(ctx BottomUpMutatorContext) {
123 moduleStrings = append(moduleStrings, ctx.Module().String())
124 ctx.Rename(ctx.Module().base().Name() + "_renamed2")
126 ctx.BottomUp("final", func(ctx BottomUpMutatorContext) {
127 moduleStrings = append(moduleStrings, ctx.Module().String())
131 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
141 ctx.Register(config)
143 _, errs := ctx.ParseFileList(".", []string{"Android.bp"})
145 _, errs = ctx.PrepareBuildActions(config)
193 ctx := NewTestContext()
204 ctx.PostDepsMutators(func(ctx RegisterMutatorsContext) {
205 ctx.BottomUp("far_deps_1", func(ctx BottomUpMutatorContext) {
206 if !strings.HasPrefix(ctx.ModuleName(), "common_dep") {
207 ctx.AddFarVariationDependencies([]blueprint.Variation{}, dep1Tag, "common_dep_1")
210 ctx.BottomUp("variant", func(ctx BottomUpMutatorContext) {
211 ctx.CreateLocalVariations("a", "b")
215 ctx.FinalDepsMutators(func(ctx RegisterMutatorsContext) {
216 ctx.BottomUp("far_deps_2", func(ctx BottomUpMutatorContext) {
217 if !strings.HasPrefix(ctx.ModuleName(), "common_dep") {
218 ctx.AddFarVariationDependencies([]blueprint.Variation{}, dep2Tag, "common_dep_2")
221 ctx.BottomUp("final", func(ctx BottomUpMutatorContext) {
222 finalGot[ctx.Module().String()] += 1
223 ctx.VisitDirectDeps(func(mod Module) {
224 finalGot[fmt.Sprintf("%s -> %s", ctx.Module().String(), mod)] += 1
229 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
244 ctx.Register(config)
246 _, errs := ctx.ParseFileList(".", []string{"Android.bp"})
248 _, errs = ctx.PrepareBuildActions(config)
270 ctx := NewTestContext()
278 ctx.FinalDepsMutators(func(ctx RegisterMutatorsContext) {
279 ctx.BottomUp("vars", func(ctx BottomUpMutatorContext) {
281 ctx.CreateVariations("a", "b")
283 ctx.BottomUp("local_vars", func(ctx BottomUpMutatorContext) {
285 ctx.CreateLocalVariations("a", "b")
289 ctx.RegisterModuleType("test", mutatorTestModuleFactory)
291 ctx.Register(config)
293 _, errs := ctx.ParseFileList(".", []string{"Android.bp"})
295 _, errs = ctx.PrepareBuildActions(config)