Add reasonable defaults to RBE configuration parameters.

Test: simple one action build
Change-Id: Ic66ad2b89866a67008950035bc3b559dae4e3a3e
This commit is contained in:
Ramy Medhat
2020-08-12 01:26:23 -04:00
parent 84ce8d8d89
commit 0fc67eb5e9
3 changed files with 86 additions and 30 deletions

View File

@@ -83,24 +83,13 @@ func TestDumpRBEMetrics(t *testing.T) {
func TestDumpRBEMetricsErrors(t *testing.T) {
ctx := testContext()
tests := []struct {
description string
rbeOutputDirDefined bool
bootstrapProgram string
expectedErr string
description string
bootstrapProgram string
expectedErr string
}{{
description: "output_dir not defined",
bootstrapProgram: rbeBootstrapProgram,
expectedErr: "RBE output dir variable not defined",
}, {
description: "stopRBE failed",
rbeOutputDirDefined: true,
bootstrapProgram: "#!/bin/bash\nexit 1\n",
expectedErr: "shutdown failed",
}, {
description: "failed to copy metrics file",
rbeOutputDirDefined: true,
bootstrapProgram: "#!/bin/bash\n",
expectedErr: "failed to copy",
description: "stopRBE failed",
bootstrapProgram: "#!/bin/bash\nexit 1\n",
expectedErr: "shutdown failed",
}}
for _, tt := range tests {
@@ -124,10 +113,6 @@ func TestDumpRBEMetricsErrors(t *testing.T) {
env.Set("OUT_DIR", tmpDir)
env.Set("RBE_DIR", tmpDir)
if tt.rbeOutputDirDefined {
env.Set("RBE_output_dir", t.TempDir())
}
config := Config{&configImpl{
environ: env,
}}