From d9d298c7607722584b965d8704b3bf77944c4381 Mon Sep 17 00:00:00 2001 From: "Lukacs T. Berki" Date: Wed, 8 Sep 2021 15:32:52 +0200 Subject: [PATCH] Remove UseValidationsForGoTests. Whenever it was called, it returned true. Test: Presubmits. Change-Id: Iabe5a99b8363771d06b200d4641d9ce477ba5b6e --- bootstrap/bootstrap.go | 20 ++------------------ bootstrap/config.go | 3 --- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/bootstrap/bootstrap.go b/bootstrap/bootstrap.go index 07c6c93..13c6a0b 100644 --- a/bootstrap/bootstrap.go +++ b/bootstrap/bootstrap.go @@ -466,19 +466,11 @@ func (g *goBinary) GenerateBuildActions(ctx blueprint.ModuleContext) { Optional: true, }) - var orderOnlyDeps, validationDeps []string - if ctx.Config().(BootstrapConfig).UseValidationsForGoTests() { - validationDeps = testDeps - } else { - orderOnlyDeps = testDeps - } - ctx.Build(pctx, blueprint.BuildParams{ Rule: cp, Outputs: []string{g.installPath}, Inputs: []string{aoutFile}, - OrderOnly: orderOnlyDeps, - Validations: validationDeps, + Validations: testDeps, Optional: !g.properties.Default, }) } @@ -606,19 +598,11 @@ func buildGoTest(ctx blueprint.ModuleContext, testRoot, testPkgArchive, Optional: true, }) - var orderOnlyDeps, validationDeps []string - if ctx.Config().(BootstrapConfig).UseValidationsForGoTests() { - validationDeps = testDeps - } else { - orderOnlyDeps = testDeps - } - ctx.Build(pctx, blueprint.BuildParams{ Rule: test, Outputs: []string{testPassed}, Inputs: []string{testFile}, - OrderOnly: orderOnlyDeps, - Validations: validationDeps, + Validations: testDeps, Args: map[string]string{ "pkg": pkgPath, "pkgSrcDir": filepath.Dir(testFiles[0]), diff --git a/bootstrap/config.go b/bootstrap/config.go index 50bfc16..6d596bc 100644 --- a/bootstrap/config.go +++ b/bootstrap/config.go @@ -92,9 +92,6 @@ type BootstrapConfig interface { // Whether to run tests for Go code RunGoTests() bool - // Whether to use Ninja validations for running Go tests - UseValidationsForGoTests() bool - Subninjas() []string PrimaryBuilderInvocations() []PrimaryBuilderInvocation }