Lines Matching refs:rule
50 rule := NewRuleBuilder(pctx, ctx)
52 rule.Command().
56 rule.Command().Text("echo success")
61 fmt.Printf("commands: %q\n", strings.Join(rule.Commands(), " && "))
62 fmt.Printf("tools: %q\n", rule.Tools())
63 fmt.Printf("inputs: %q\n", rule.Inputs())
64 fmt.Printf("outputs: %q\n", rule.Outputs())
76 rule := NewRuleBuilder(pctx, ctx)
78 rule.Command().
82 rule.Command().Text("cp out/a out/b").
85 fmt.Printf("commands: %q\n", strings.Join(rule.Commands(), " && "))
86 fmt.Printf("tools: %q\n", rule.Tools())
87 fmt.Printf("inputs: %q\n", rule.Inputs())
88 fmt.Printf("outputs: %q\n", rule.Outputs())
89 fmt.Printf("symlink_outputs: %q\n", rule.SymlinkOutputs())
102 rule := NewRuleBuilder(pctx, ctx)
104 rule.Command().
108 rule.Command().
112 rule.Temporary(PathForOutput(ctx, "b"))
114 fmt.Printf("commands: %q\n", strings.Join(rule.Commands(), " && "))
115 fmt.Printf("tools: %q\n", rule.Tools())
116 fmt.Printf("inputs: %q\n", rule.Inputs())
117 fmt.Printf("outputs: %q\n", rule.Outputs())
129 rule := NewRuleBuilder(pctx, ctx)
131 rule.Command().
135 rule.Command().
139 rule.Temporary(PathForOutput(ctx, "b"))
140 rule.DeleteTemporaryFiles()
142 fmt.Printf("commands: %q\n", strings.Join(rule.Commands(), " && "))
143 fmt.Printf("tools: %q\n", rule.Tools())
144 fmt.Printf("inputs: %q\n", rule.Inputs())
145 fmt.Printf("outputs: %q\n", rule.Outputs())
157 rule := NewRuleBuilder(pctx, ctx)
161 rule.Command().
165 rule.Install(out, "/bin/linked")
166 rule.Install(out, "/sbin/linked")
168 fmt.Printf("rule.Installs().String() = %q\n", rule.Installs().String())
177 rule := NewRuleBuilder(pctx, ctx)
180 rule.Command().
186 cmd := rule.Command()
192 cmd = rule.Command().Tool(PathForSource(ctx, "ld"))
306 addCommands := func(rule *RuleBuilder) {
307 cmd := rule.Command().
331 rule.Command().
346 rule.Command().
370 rule := NewRuleBuilder(pctx, ctx)
371 addCommands(rule)
384 AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())
386 AssertDeepEquals(t, "rule.Inputs()", wantInputs, rule.Inputs())
387 AssertDeepEquals(t, "rule.RspfileInputs()", wantRspFileInputs, rule.RspFileInputs())
388 AssertDeepEquals(t, "rule.Outputs()", wantOutputs, rule.Outputs())
389 AssertDeepEquals(t, "rule.SymlinkOutputs()", wantSymlinkOutputs, rule.SymlinkOutputs())
390 AssertDeepEquals(t, "rule.DepFiles()", wantDepFiles, rule.DepFiles())
391 AssertDeepEquals(t, "rule.Tools()", wantTools, rule.Tools())
392 AssertDeepEquals(t, "rule.OrderOnlys()", wantOrderOnlys, rule.OrderOnlys())
393 AssertDeepEquals(t, "rule.Validations()", wantValidations, rule.Validations())
395 …AssertSame(t, "rule.depFileMergerCmd()", wantDepMergerCommand, rule.depFileMergerCmd(rule.DepFiles…
399 rule := NewRuleBuilder(pctx, ctx).Sbox(PathForOutput(ctx, "module"),
401 addCommands(rule)
414 AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())
416 AssertDeepEquals(t, "rule.Inputs()", wantInputs, rule.Inputs())
417 AssertDeepEquals(t, "rule.RspfileInputs()", wantRspFileInputs, rule.RspFileInputs())
418 AssertDeepEquals(t, "rule.Outputs()", wantOutputs, rule.Outputs())
419 AssertDeepEquals(t, "rule.SymlinkOutputs()", wantSymlinkOutputs, rule.SymlinkOutputs())
420 AssertDeepEquals(t, "rule.DepFiles()", wantDepFiles, rule.DepFiles())
421 AssertDeepEquals(t, "rule.Tools()", wantTools, rule.Tools())
422 AssertDeepEquals(t, "rule.OrderOnlys()", wantOrderOnlys, rule.OrderOnlys())
423 AssertDeepEquals(t, "rule.Validations()", wantValidations, rule.Validations())
425 …AssertSame(t, "rule.depFileMergerCmd()", wantDepMergerCommand, rule.depFileMergerCmd(rule.DepFiles…
429 rule := NewRuleBuilder(pctx, ctx).Sbox(PathForOutput(ctx, "module"),
431 addCommands(rule)
444 AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())
446 AssertDeepEquals(t, "rule.Inputs()", wantInputs, rule.Inputs())
447 AssertDeepEquals(t, "rule.RspfileInputs()", wantRspFileInputs, rule.RspFileInputs())
448 AssertDeepEquals(t, "rule.Outputs()", wantOutputs, rule.Outputs())
449 AssertDeepEquals(t, "rule.SymlinkOutputs()", wantSymlinkOutputs, rule.SymlinkOutputs())
450 AssertDeepEquals(t, "rule.DepFiles()", wantDepFiles, rule.DepFiles())
451 AssertDeepEquals(t, "rule.Tools()", wantTools, rule.Tools())
452 AssertDeepEquals(t, "rule.OrderOnlys()", wantOrderOnlys, rule.OrderOnlys())
453 AssertDeepEquals(t, "rule.Validations()", wantValidations, rule.Validations())
455 …AssertSame(t, "rule.depFileMergerCmd()", wantDepMergerCommand, rule.depFileMergerCmd(rule.DepFiles…
459 rule := NewRuleBuilder(pctx, ctx).Sbox(PathForOutput(ctx, "module"),
461 addCommands(rule)
474 AssertDeepEquals(t, "rule.Commands()", wantCommands, rule.Commands())
476 AssertDeepEquals(t, "rule.Inputs()", wantInputs, rule.Inputs())
477 AssertDeepEquals(t, "rule.RspfileInputs()", wantRspFileInputs, rule.RspFileInputs())
478 AssertDeepEquals(t, "rule.Outputs()", wantOutputs, rule.Outputs())
479 AssertDeepEquals(t, "rule.SymlinkOutputs()", wantSymlinkOutputs, rule.SymlinkOutputs())
480 AssertDeepEquals(t, "rule.DepFiles()", wantDepFiles, rule.DepFiles())
481 AssertDeepEquals(t, "rule.Tools()", wantTools, rule.Tools())
482 AssertDeepEquals(t, "rule.OrderOnlys()", wantOrderOnlys, rule.OrderOnlys())
483 AssertDeepEquals(t, "rule.Validations()", wantValidations, rule.Validations())
485 …AssertSame(t, "rule.depFileMergerCmd()", wantDepMergerCommand, rule.depFileMergerCmd(rule.DepFiles…
556 rule := NewRuleBuilder(pctx, ctx)
559 rule.Sbox(outDir, manifestPath)
561 rule.SandboxInputs()
565 rule.Command().
577 rule.Restat()
580 rule.Build("rule", "desc")