-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Open
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Description
Go version
go1.21.5
Output of go env in your module/workspace:
GO111MODULE=''
GOARCH='amd64'
GOBIN=''
GOCACHE='/home/snaipe/.local/var/cache/go-build'
GOENV='/home/snaipe/.local/etc/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/home/snaipe/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/home/snaipe/go'
GOPRIVATE=''
GOPROXY='https://proxy.golang.org,direct'
GOROOT='/usr/lib/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''
GOTOOLCHAIN='auto'
GOTOOLDIR='/usr/lib/go/pkg/tool/linux_amd64'
GOVCS=''
GOVERSION='go1.21.5'
GCCGO='gccgo'
GOAMD64='v1'
AR='ar'
CC='gcc'
CXX='g++'
CGO_ENABLED='1'
GOMOD='/home/snaipe/b5/src/barney.ci/golang/generator/go.mod'
GOWORK=''
CGO_CFLAGS='-O2 -g'
CGO_CPPFLAGS=''
CGO_CXXFLAGS='-O2 -g'
CGO_FFLAGS='-O2 -g'
CGO_LDFLAGS='-O2 -g'
PKG_CONFIG='pkg-config'
GOGCCFLAGS='-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -ffile-prefix-map=/tmp/go-build859927413=/tmp/go-build -gno-record-gcc-switches'What did you do?
Running the following commands:
$ go test -a -n 2>build.sh
$ WORK=/tmp/go-test envsubst '$WORK' <build.sh >build-exp.sh
$ sh -xe ./build-exp.sh </dev/null... should reproduce the same effect as running go test normally.
What did you see happen?
The command building the test binary fails to find _testmain.go
+ /usr/lib/go/pkg/tool/linux_amd64/compile -o /tmp/go-test/b001/_pkg_.a -trimpath /tmp/go-test/b001=> -p main -complete -buildid yj7N4yan_zFjBd_JXc9h/yj7N4yan_zFjBd_JXc9h -dwarf=false -goversion go1.21.5 -c=4 -nolocalimports -importcfg /tmp/go-test/b001/importcfg -pack /tmp/go-test/b001/_testmain.go
open /tmp/go-test/b001/_testmain.go: no such file or directoryWhat did you expect to see?
The compile command should have succeeded.
This is happening because the writing of the _testmain.go file is directly done by go test rather than done via an action.
Metadata
Metadata
Assignees
Labels
NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.