diff --git a/cmd/buildkitd/main.go b/cmd/buildkitd/main.go index e6fde905b46f..e30f71bf9d1e 100644 --- a/cmd/buildkitd/main.go +++ b/cmd/buildkitd/main.go @@ -193,9 +193,10 @@ func main() { Value: groupValue(defaultConf.GRPC.GID), }, cli.StringFlag{ - Name: "debugaddr", - Usage: "debugging address (eg. 0.0.0.0:6060)", - Value: defaultConf.GRPC.DebugAddress, + Name: "debugaddr", + Usage: "debugging address (eg. 0.0.0.0:6060)", + Value: defaultConf.GRPC.DebugAddress, + EnvVar: "BUILDKITD_DEBUGADDR", }, cli.StringFlag{ Name: "tlscert", diff --git a/util/testutil/workers/util.go b/util/testutil/workers/util.go index 3804e9aab8db..02158965ea56 100644 --- a/util/testutil/workers/util.go +++ b/util/testutil/workers/util.go @@ -73,12 +73,13 @@ func runBuildkitd( address := getBuildkitdAddr(tmpdir) debugAddress := getBuildkitdDebugAddr(tmpdir) - args = append(args, "--root", tmpdir, "--addr", address, "--debugaddr", debugAddress, "--debug") + args = append(args, "--root", tmpdir, "--addr", address, "--debug") cmd := exec.Command(args[0], args[1:]...) //nolint:gosec // test utility cmd.Env = append( os.Environ(), "BUILDKIT_DEBUG_EXEC_OUTPUT=1", "BUILDKIT_DEBUG_PANIC_ON_ERROR=1", + "BUILDKITD_DEBUGADDR="+debugAddress, "TMPDIR="+filepath.Join(tmpdir, "tmp")) if v := os.Getenv("GO_TEST_COVERPROFILE"); v != "" { coverDir := filepath.Join(filepath.Dir(v), "helpers")