support toggling compare mode for rbe actions
This allows me to set metalava actions to run remotely (already toggleable) with local comparison (this CL). Change-Id: I66b006d5ee11b3192ef81a2e5cefc07e9f3d10a2
This commit is contained in:
@@ -19,6 +19,7 @@ import (
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/google/blueprint/proptools"
|
||||
@@ -497,6 +498,7 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
|
||||
if metalavaUseRbe(ctx) {
|
||||
rule.Remoteable(android.RemoteRuleSupports{RBE: true})
|
||||
execStrategy := ctx.Config().GetenvWithDefault("RBE_METALAVA_EXEC_STRATEGY", remoteexec.LocalExecStrategy)
|
||||
compare, _ := strconv.ParseBool(ctx.Config().GetenvWithDefault("RBE_METALAVA_COMPARE", "false"))
|
||||
labels := map[string]string{"type": "tool", "name": "metalava"}
|
||||
// TODO: metalava pool rejects these jobs
|
||||
pool := ctx.Config().GetenvWithDefault("RBE_METALAVA_POOL", "java16")
|
||||
@@ -505,6 +507,9 @@ func metalavaCmd(ctx android.ModuleContext, rule *android.RuleBuilder, javaVersi
|
||||
ExecStrategy: execStrategy,
|
||||
ToolchainInputs: []string{config.JavaCmd(ctx).String()},
|
||||
Platform: map[string]string{remoteexec.PoolKey: pool},
|
||||
Compare: compare,
|
||||
NumLocalRuns: 1,
|
||||
NumRemoteRuns: 1,
|
||||
})
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user