Fix RuleBuilder.Restat am: baa676f671
am: ee3c74b457
Change-Id: Id735ac676a33e7f78663575b7f20294937cbf1af
This commit is contained in:
@@ -242,6 +242,7 @@ func (r *RuleBuilder) Build(pctx PackageContext, ctx BuilderContext, name string
|
||||
Rule: ctx.Rule(pctx, name, blueprint.RuleParams{
|
||||
Command: strings.Join(proptools.NinjaEscapeList(r.Commands()), " && "),
|
||||
CommandDeps: r.Tools().Strings(),
|
||||
Restat: r.restat,
|
||||
}),
|
||||
Implicits: r.Inputs(),
|
||||
Outputs: r.Outputs(),
|
||||
|
@@ -331,6 +331,8 @@ func testRuleBuilder_Build(ctx BuilderContext, in Path, out WritablePath) {
|
||||
|
||||
rule.Command().Tool(PathForSource(ctx, "cp")).Input(in).Output(out)
|
||||
|
||||
rule.Restat()
|
||||
|
||||
rule.Build(pctx, ctx, "rule", "desc")
|
||||
}
|
||||
|
||||
@@ -376,6 +378,10 @@ func TestRuleBuilder_Build(t *testing.T) {
|
||||
if len(params.Outputs) != 1 || params.Outputs[0].String() != wantOutput {
|
||||
t.Errorf("want Outputs = [%q], got %q", wantOutput, params.Outputs.Strings())
|
||||
}
|
||||
|
||||
if !params.RuleParams.Restat {
|
||||
t.Errorf("want RuleParams.Restat = true, got %v", params.RuleParams.Restat)
|
||||
}
|
||||
}
|
||||
|
||||
t.Run("module", func(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user