diff options
| author | 2020-08-13 22:53:42 -0400 | |
|---|---|---|
| committer | 2020-08-13 22:53:42 -0400 | |
| commit | a958d352476308c37ee2cd667fbd89f6c8ec2ac6 (patch) | |
| tree | e6925098a065ccf6dd898c90d35e1e052a8dce13 | |
| parent | 29737cfc944f73f5c1095126d1d2d701b1a7db09 (diff) | |
Do not generate a random socket address for RBE if NOSTART_RBE is set.
Test: A build with NOSTART_RBE=1
Change-Id: I5872632442c754b597901b7729eed597ee45859f
| -rw-r--r-- | ui/build/rbe.go | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/ui/build/rbe.go b/ui/build/rbe.go index 99107e3d9..73438ccb8 100644 --- a/ui/build/rbe.go +++ b/ui/build/rbe.go @@ -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 |