cmd/go/internal/modfetch: more logging in TestConvertLegacyConfig
Make the test report git commands run when invoked with -v
(by setting the build -x flag).
Change-Id: I83a532a491eba3b5e330d37897d563e394950641
Reviewed-on: https://go-review.googlesource.com/117937
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
diff --git a/vendor/cmd/go/internal/modfetch/convert_test.go b/vendor/cmd/go/internal/modfetch/convert_test.go
index 509f5c6..1901b46 100644
--- a/vendor/cmd/go/internal/modfetch/convert_test.go
+++ b/vendor/cmd/go/internal/modfetch/convert_test.go
@@ -9,6 +9,7 @@
"strings"
"testing"
+ "cmd/go/internal/cfg"
"cmd/go/internal/modconv"
"cmd/go/internal/modfile"
"cmd/go/internal/webtest"
@@ -19,6 +20,14 @@
webtest.Hook()
defer webtest.Unhook()
+ if testing.Verbose() {
+ old := cfg.BuildX
+ defer func() {
+ cfg.BuildX = old
+ }()
+ cfg.BuildX = true
+ }
+
var tests = []struct {
path string
vers string