diff options
author | Bryan C. Mills <bcmills@google.com> | 2022-05-31 17:03:29 -0400 |
---|---|---|
committer | Bryan Mills <bcmills@google.com> | 2022-06-01 02:37:46 +0000 |
commit | 8a56c7742d96c8ef8e8dcecaf3d1c0e9f022f708 (patch) | |
tree | cbc4574410850d34d03866fa6d691bed705f92f8 /src/cmd/go/script_test.go | |
parent | 085529bd5fa3ab508784f6a3d42f15d2dafddc65 (diff) | |
download | go-8a56c7742d96c8ef8e8dcecaf3d1c0e9f022f708.tar.gz go-8a56c7742d96c8ef8e8dcecaf3d1c0e9f022f708.zip |
cmd/go: set GIT_TRACE_CURL for tests on builders
We have noticed a pattern of connection timeouts connecting to
github.com on the builders. Adding tracing may shed some light on the
underlying cause.
For #52545.
Change-Id: Ic73b494be9a3ea8ce3c7631ee8f62bd3d0d8e7bd
Reviewed-on: https://go-review.googlesource.com/c/go/+/409575
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/go/script_test.go')
-rw-r--r-- | src/cmd/go/script_test.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cmd/go/script_test.go b/src/cmd/go/script_test.go index 33bad4d741..04bc8d581a 100644 --- a/src/cmd/go/script_test.go +++ b/src/cmd/go/script_test.go @@ -190,6 +190,14 @@ func (ts *testScript) setup() { "/=" + string(os.PathSeparator), "CMDGO_TEST_RUN_MAIN=true", } + if testenv.Builder() != "" || os.Getenv("GIT_TRACE_CURL") == "1" { + // To help diagnose https://go.dev/issue/52545, + // enable tracing for Git HTTPS requests. + ts.env = append(ts.env, + "GIT_TRACE_CURL=1", + "GIT_TRACE_CURL_NO_DATA=1", + "GIT_REDACT_COOKIES=o,SSO,GSSO_Uberproxy") + } if !testenv.HasExternalNetwork() { ts.env = append(ts.env, "TESTGONETWORK=panic", "TESTGOVCS=panic") } |