Do not generate a random socket address for RBE if NOSTART_RBE is set.

Test: A build with NOSTART_RBE=1
Bug: b/166273085
Change-Id: I5872632442c754b597901b7729eed597ee45859f
Merged-In: I5872632442c754b597901b7729eed597ee45859f
This commit is contained in:
Ramy Medhat 2020-08-13 22:53:42 -04:00 committed by Patrice Arruda
parent ee17f8c02e
commit cbe9aa2c2a
1 changed files with 7 additions and 5 deletions

View File

@ -53,11 +53,13 @@ func rbeCommand(ctx Context, config Config, rbeCmd string) string {
func getRBEVars(ctx Context, config Config) map[string]string {
rand.Seed(time.Now().UnixNano())
vars := map[string]string{
"RBE_server_address": fmt.Sprintf("unix://%v/reproxy_%v.sock", absPath(ctx, config.TempDir()), rand.Intn(1000)),
"RBE_log_path": config.rbeLogPath(),
"RBE_re_proxy": config.rbeReproxy(),
"RBE_exec_root": config.rbeExecRoot(),
"RBE_output_dir": config.rbeStatsOutputDir(),
"RBE_log_path": config.rbeLogPath(),
"RBE_re_proxy": config.rbeReproxy(),
"RBE_exec_root": config.rbeExecRoot(),
"RBE_output_dir": config.rbeStatsOutputDir(),
}
if config.StartRBE() {
vars["RBE_server_address"] = fmt.Sprintf("unix://%v/reproxy_%v.sock", absPath(ctx, config.TempDir()), rand.Intn(1000))
}
k, v := config.rbeAuth()
vars[k] = v