summaryrefslogtreecommitdiff
path: root/remoteexec/remoteexec.go
diff options
context:
space:
mode:
Diffstat (limited to 'remoteexec/remoteexec.go')
-rw-r--r--remoteexec/remoteexec.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/remoteexec/remoteexec.go b/remoteexec/remoteexec.go
index 9e7a0f1e3..8294c3fa3 100644
--- a/remoteexec/remoteexec.go
+++ b/remoteexec/remoteexec.go
@@ -15,6 +15,7 @@
package remoteexec
import (
+ "fmt"
"sort"
"strings"
)
@@ -29,7 +30,7 @@ const (
// DefaultImage is the default container image used for Android remote execution. The
// image was built with the Dockerfile at
// https://android.googlesource.com/platform/prebuilts/remoteexecution-client/+/refs/heads/master/docker/Dockerfile
- DefaultImage = "docker://gcr.io/androidbuild-re-dockerimage/android-build-remoteexec-image@sha256:582efb38f0c229ea39952fff9e132ccbe183e14869b39888010dacf56b360d62"
+ DefaultImage = "docker://gcr.io/androidbuild-re-dockerimage/android-build-remoteexec-image@sha256:1eb7f64b9e17102b970bd7a1af7daaebdb01c3fb777715899ef462d6c6d01a45"
// DefaultWrapperPath is the default path to the remote execution wrapper.
DefaultWrapperPath = "prebuilts/remoteexecution-client/live/rewrapper"
@@ -84,6 +85,14 @@ type REParams struct {
// EnvironmentVariables is a list of environment variables whose values should be passed through
// to the remote execution.
EnvironmentVariables []string
+ // Boolean indicating whether to compare chosen exec strategy with local execution.
+ Compare bool
+ // Number of times the action should be rerun locally.
+ NumLocalRuns int
+ // Number of times the action should be rerun remotely.
+ NumRemoteRuns int
+ // Boolean indicating whether to update remote cache entry. Rewrapper defaults to true, so the name is negated here.
+ NoRemoteUpdateCache bool
}
func init() {
@@ -135,6 +144,14 @@ func (r *REParams) wrapperArgs() string {
}
args += " --exec_strategy=" + strategy
+ if r.Compare && r.NumLocalRuns >= 0 && r.NumRemoteRuns >= 0 {
+ args += fmt.Sprintf(" --compare=true --num_local_reruns=%d --num_remote_reruns=%d", r.NumLocalRuns, r.NumRemoteRuns)
+ }
+
+ if r.NoRemoteUpdateCache {
+ args += " --remote_update_cache=false"
+ }
+
if len(r.Inputs) > 0 {
args += " --inputs=" + strings.Join(r.Inputs, ",")
}