You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
go env Output
$ go env
set GO111MODULE=
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\zibin\AppData\Local\go-build
set GOENV=C:\Users\zibin\AppData\Roaming\go\env
set GOEXE=.exe
set GOFLAGS=
set GOHOSTARCH=amd64
set GOHOSTOS=windows
set GONOPROXY=
set GONOSUMDB=
set GOOS=windows
set GOPATH=e:\go
set GOPRIVATE=
set GOPROXY=https://goproxy.io
set GOROOT=d:\go
set GOSUMDB=sum.golang.org
set GOTMPDIR=
set GOTOOLDIR=d:\go\pkg\tool\windows_amd64
set GCCGO=gccgo
set AR=ar
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=E:\goProject\hpyx\hpyxBase\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\zibin\AppData\Local\Temp\go-build141868538=/tmp/go-build -gno-record-gcc-switches
What did you do?
execute
go test -args -c e:\go\bin\config.ini
What did you expect to see?
normal operation go test Result
What did you see instead?
flag provided but not defined: -test.timeout
Usage of C:\Users\zibin\AppData\Local\Temp\go-build018891410\b001\data.test.exe:
-config string
配置文件路径 (default "configBase.ini")
-log string
日志文件路径 (default "logs\logBase.log")
exit status 2
FAIL hpyx/hpyxBase/data 0.051s
The text was updated successfully, but these errors were encountered:
Testing flags are now registered in the new Init function, which is invoked by the generated main function for the test. As a result, testing flags are now only registered when running a test binary, and packages that call flag.Parse during package initialization may cause tests to fail.
Closing as there isn't something that needs to be done here. It's also a duplicate of #31859.
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
execute
go test -args -c e:\go\bin\config.ini
What did you expect to see?
normal operation go test Result
What did you see instead?
flag provided but not defined: -test.timeout
Usage of C:\Users\zibin\AppData\Local\Temp\go-build018891410\b001\data.test.exe:
-config string
配置文件路径 (default "configBase.ini")
-log string
日志文件路径 (default "logs\logBase.log")
exit status 2
FAIL hpyx/hpyxBase/data 0.051s
The text was updated successfully, but these errors were encountered: