Add support for the remote execution of metalava actions.
Test: built aosp crosshatch userdebug with RBE_METALAVA=1
Change-Id: I3d42d75b4522f99ff95ce8c997ead782e4322f6e
diff --git a/remoteexec/remoteexec_test.go b/remoteexec/remoteexec_test.go
index 30e891c..56985d3 100644
--- a/remoteexec/remoteexec_test.go
+++ b/remoteexec/remoteexec_test.go
@@ -17,6 +17,8 @@
import (
"fmt"
"testing"
+
+ "android/soong/android"
)
func TestTemplate(t *testing.T) {
@@ -64,6 +66,22 @@
}
}
+func TestNoVarTemplate(t *testing.T) {
+ params := &REParams{
+ Labels: map[string]string{"type": "compile", "lang": "cpp", "compiler": "clang"},
+ Inputs: []string{"$in"},
+ OutputFiles: []string{"$out"},
+ Platform: map[string]string{
+ ContainerImageKey: DefaultImage,
+ PoolKey: "default",
+ },
+ }
+ want := fmt.Sprintf("prebuilts/remoteexecution-client/live/rewrapper --labels=compiler=clang,lang=cpp,type=compile --platform=\"Pool=default,container-image=%s\" --exec_strategy=local --inputs=$in --output_files=$out -- ", DefaultImage)
+ if got := params.NoVarTemplate(android.NullConfig("")); got != want {
+ t.Errorf("NoVarTemplate() returned\n%s\nwant\n%s", got, want)
+ }
+}
+
func TestTemplateDeterminism(t *testing.T) {
r := &REParams{
Labels: map[string]string{"type": "compile", "lang": "cpp", "compiler": "clang"},