diff options
author | 2020-04-30 03:08:37 -0400 | |
---|---|---|
committer | 2020-04-30 03:24:48 -0400 | |
commit | 427683cad730f351e44b74229f4f84e898e35a72 (patch) | |
tree | 206fccad4298f247c99a4ca2de84b3cedcd00b77 /remoteexec/remoteexec_test.go | |
parent | b407131a0ef69ebd5ec04d49d92735b1af18778f (diff) |
Add support for the remote execution of metalava actions.
Test: built aosp crosshatch userdebug with RBE_METALAVA=1
Change-Id: I3d42d75b4522f99ff95ce8c997ead782e4322f6e
Diffstat (limited to 'remoteexec/remoteexec_test.go')
-rw-r--r-- | remoteexec/remoteexec_test.go | 18 |
1 files changed, 18 insertions, 0 deletions
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"}, |