From 427683cad730f351e44b74229f4f84e898e35a72 Mon Sep 17 00:00:00 2001 From: Ramy Medhat Date: Thu, 30 Apr 2020 03:08:37 -0400 Subject: Add support for the remote execution of metalava actions. Test: built aosp crosshatch userdebug with RBE_METALAVA=1 Change-Id: I3d42d75b4522f99ff95ce8c997ead782e4322f6e --- remoteexec/remoteexec_test.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'remoteexec/remoteexec_test.go') diff --git a/remoteexec/remoteexec_test.go b/remoteexec/remoteexec_test.go index 30e891ced..56985d356 100644 --- a/remoteexec/remoteexec_test.go +++ b/remoteexec/remoteexec_test.go @@ -17,6 +17,8 @@ package remoteexec import ( "fmt" "testing" + + "android/soong/android" ) func TestTemplate(t *testing.T) { @@ -64,6 +66,22 @@ func TestTemplate(t *testing.T) { } } +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"}, -- cgit v1.2.3-59-g8ed1b