Remove UseValidationsForGoTests. am: d9d298c760

Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/1821772

Change-Id: I8a4958fea48cb695ea632e880f01776dbbc902d2
This commit is contained in:
Lukacs T. Berki 2021-09-09 06:24:32 +00:00 committed by Automerger Merge Worker
commit f16d2de6d0
2 changed files with 2 additions and 21 deletions

View file

@ -466,19 +466,11 @@ func (g *goBinary) GenerateBuildActions(ctx blueprint.ModuleContext) {
Optional: true, Optional: true,
}) })
var orderOnlyDeps, validationDeps []string
if ctx.Config().(BootstrapConfig).UseValidationsForGoTests() {
validationDeps = testDeps
} else {
orderOnlyDeps = testDeps
}
ctx.Build(pctx, blueprint.BuildParams{ ctx.Build(pctx, blueprint.BuildParams{
Rule: cp, Rule: cp,
Outputs: []string{g.installPath}, Outputs: []string{g.installPath},
Inputs: []string{aoutFile}, Inputs: []string{aoutFile},
OrderOnly: orderOnlyDeps, Validations: testDeps,
Validations: validationDeps,
Optional: !g.properties.Default, Optional: !g.properties.Default,
}) })
} }
@ -606,19 +598,11 @@ func buildGoTest(ctx blueprint.ModuleContext, testRoot, testPkgArchive,
Optional: true, Optional: true,
}) })
var orderOnlyDeps, validationDeps []string
if ctx.Config().(BootstrapConfig).UseValidationsForGoTests() {
validationDeps = testDeps
} else {
orderOnlyDeps = testDeps
}
ctx.Build(pctx, blueprint.BuildParams{ ctx.Build(pctx, blueprint.BuildParams{
Rule: test, Rule: test,
Outputs: []string{testPassed}, Outputs: []string{testPassed},
Inputs: []string{testFile}, Inputs: []string{testFile},
OrderOnly: orderOnlyDeps, Validations: testDeps,
Validations: validationDeps,
Args: map[string]string{ Args: map[string]string{
"pkg": pkgPath, "pkg": pkgPath,
"pkgSrcDir": filepath.Dir(testFiles[0]), "pkgSrcDir": filepath.Dir(testFiles[0]),

View file

@ -92,9 +92,6 @@ type BootstrapConfig interface {
// Whether to run tests for Go code // Whether to run tests for Go code
RunGoTests() bool RunGoTests() bool
// Whether to use Ninja validations for running Go tests
UseValidationsForGoTests() bool
Subninjas() []string Subninjas() []string
PrimaryBuilderInvocations() []PrimaryBuilderInvocation PrimaryBuilderInvocations() []PrimaryBuilderInvocation
} }