Generate RBE socket address randomly for each invocation of soong.
Test: started soong multiple times and saw different socket files in out/soong/.temp Change-Id: Ib0087dd3867bdbf584c6868196070840cff291aa
This commit is contained in:
@@ -15,8 +15,11 @@
|
||||
package build
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/rand"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
"android/soong/ui/metrics"
|
||||
)
|
||||
@@ -49,6 +52,11 @@ func rbeCommand(ctx Context, config Config, rbeCmd string) string {
|
||||
return cmdPath
|
||||
}
|
||||
|
||||
func getRBEVars(ctx Context, tmpDir string) map[string]string {
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
return map[string]string{"RBE_server_address": fmt.Sprintf("unix://%v/reproxy_%v.sock", tmpDir, rand.Intn(1000))}
|
||||
}
|
||||
|
||||
func startRBE(ctx Context, config Config) {
|
||||
ctx.BeginTrace(metrics.RunSetupTool, "rbe_bootstrap")
|
||||
defer ctx.EndTrace()
|
||||
|
Reference in New Issue
Block a user