New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/go: go test fails with /tmp/go-build403193460/b531/importcfg: no such file or directory #27948

Open
praveenkumar opened this Issue Oct 1, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@praveenkumar

praveenkumar commented Oct 1, 2018

What version of Go are you using (go version)?

go version go1.10.4 linux/amd64

Does this issue reproduce with the latest release?

Not tried.

What operating system and processor architecture are you using (go env)?

$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/prkumar/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/prkumar/work/gitlab/go"
GORACE=""
GOROOT="/usr/lib/golang"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build213312668=/tmp/go-build -gno-record-gcc-switches"

What did you do?

@go test -tags "$(BUILD_TAGS)" -ldflags="$(VERSION_VARIABLES)"  ./...

What did you expect to see?

Should be successful/

What did you see instead?

$ go test -tags containers_image_openpgp containers_image_ostree_stub exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay -ldflags=-X github.com/minishift/minishift/pkg/version.minishiftVersion=1.24.0 -X github.com/minishift/minishift/pkg/version.b2dIsoVersion=v1.3.0 -X github.com/minishift/minishift/pkg/version.centOsIsoVersion=v1.12.0 -X github.com/minishift/minishift/pkg/version.openshiftVersion=v3.x.x -X github.com/minishift/minishift/pkg/version.commitSha=aa3dd4c8 -X github.com/minishift/minishift/pkg/version.cdkVersion=x.x.x-dev-1 ./...
open /tmp/go-build403193460/b211/vet.cfg: no such file or directory
go build github.com/minishift/minishift/pkg/util/ocpdownload (testmain): open /tmp/go-build403193460/b528/importcfg: no such file or directory
open /tmp/go-build403193460/b159/vet.cfg: no such file or directory
open /tmp/go-build403193460/b177/vet.cfg: no such file or directory
open /tmp/go-build403193460/b234/vet.cfg: no such file or directory
open /tmp/go-build403193460/b222/vet.cfg: no such file or directory
go build github.com/minishift/minishift/pkg/util/shell (testmain): open /tmp/go-build403193460/b531/importcfg: no such file or directory
go build github.com/minishift/minishift/pkg/util/strings (testmain): open /tmp/go-build403193460/b534/importcfg: no such file or directory
open /tmp/go-build403193460/b166/vet.cfg: no such file or directory
go build github.com/minishift/minishift/cmd/minishift/cmd (testmain): open /tmp/go-build403193460/b409/importcfg: no such file or directory
?   	github.com/minishift/minishift	[no test files]
?   	github.com/minishift/minishift/cmd/minishift	[no test files]
FAIL	github.com/minishift/minishift/cmd/minishift/cmd [build failed]
ok  	github.com/minishift/minishift/cmd/minishift/cmd/addon	(cached)
ok  	github.com/minishift/minishift/cmd/minishift/cmd/config	(cached)
?   	github.com/minishift/minishift/cmd/minishift/cmd/dns	[no test files]
ok  	github.com/minishift/minishift/cmd/minishift/cmd/hostfolder	(cached)
ok  	github.com/minishift/minishift/cmd/minishift/cmd/image	(cached)
ok  	github.com/minishift/minishift/cmd/minishift/cmd/openshift	(cached)
ok  	github.com/minishift/minishift/cmd/minishift/cmd/profile	(cached)
?   	github.com/minishift/minishift/cmd/minishift/cmd/registration	[no test files]
?   	github.com/minishift/minishift/cmd/minishift/cmd/services	[no test files]
ok  	github.com/minishift/minishift/cmd/minishift/cmd/util	(cached)
?   	github.com/minishift/minishift/cmd/minishift/state	[no test files]
?   	github.com/minishift/minishift/cmd/testing/cli	[no test files]
?   	github.com/minishift/minishift/pkg/minikube/assets	[no test files]
ok  	github.com/minishift/minishift/pkg/minikube/cluster	(cached)
ok  	github.com/minishift/minishift/pkg/minikube/constants	(cached)
?   	github.com/minishift/minishift/pkg/minikube/kubeconfig	[no test files]
ok  	github.com/minishift/minishift/pkg/minikube/machine	(cached)
ok  	github.com/minishift/minishift/pkg/minikube/sshutil	(cached)
?   	github.com/minishift/minishift/pkg/minikube/tests	[no test files]
ok  	github.com/minishift/minishift/pkg/minishift/addon	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/addon/command	(cached)
?   	github.com/minishift/minishift/pkg/minishift/addon/config	[no test files]
ok  	github.com/minishift/minishift/pkg/minishift/addon/manager	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/addon/parser	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/cache	(cached)
?   	github.com/minishift/minishift/pkg/minishift/cluster	[no test files]
ok  	github.com/minishift/minishift/pkg/minishift/clusterup	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/config	(cached)
?   	github.com/minishift/minishift/pkg/minishift/constants	[no test files]
?   	github.com/minishift/minishift/pkg/minishift/docker	[no test files]
ok  	github.com/minishift/minishift/pkg/minishift/docker/image	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/hostfolder	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/hostfolder/config	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/network	(cached)
?   	github.com/minishift/minishift/pkg/minishift/network/dns	[no test files]
?   	github.com/minishift/minishift/pkg/minishift/network/proxy	[no test files]
ok  	github.com/minishift/minishift/pkg/minishift/oc	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/openshift	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/openshift/version	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/profile	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/provisioner	1.747s
ok  	github.com/minishift/minishift/pkg/minishift/registration	5.261s
?   	github.com/minishift/minishift/pkg/minishift/remotehost	[no test files]
?   	github.com/minishift/minishift/pkg/minishift/shell/powershell	[no test files]
?   	github.com/minishift/minishift/pkg/minishift/systemd	[no test files]
?   	github.com/minishift/minishift/pkg/minishift/systemd/action	[no test files]
?   	github.com/minishift/minishift/pkg/minishift/tls	[no test files]
ok  	github.com/minishift/minishift/pkg/minishift/update	(cached)
ok  	github.com/minishift/minishift/pkg/minishift/util	(cached)
ok  	github.com/minishift/minishift/pkg/testing	(cached)
ok  	github.com/minishift/minishift/pkg/util	(cached)
?   	github.com/minishift/minishift/pkg/util/archive	[no test files]
ok  	github.com/minishift/minishift/pkg/util/cmd	(cached)
ok  	github.com/minishift/minishift/pkg/util/filehelper	0.012s
FAIL	github.com/minishift/minishift/pkg/util/ocpdownload [build failed]
FAIL	github.com/minishift/minishift/pkg/util/shell [build failed]
FAIL	github.com/minishift/minishift/pkg/util/strings [build failed]
make: *** [Makefile:262: test] Error 1

If I indually run the test case on the fails one it success :(

$ go test github.com/minishift/minishift/cmd/minishift/cmd
ok  	github.com/minishift/minishift/cmd/minishift/cmd	0.029s

$ go test github.com/minishift/minishift/pkg/util/shell
ok  	github.com/minishift/minishift/pkg/util/shell	(cached)

$ go test github.com/minishift/minishift/pkg/util/strings
ok  	github.com/minishift/minishift/pkg/util/strings	(cached)

$ go test github.com/minishift/minishift/pkg/util/ocpdownload
ok  	github.com/minishift/minishift/pkg/util/ocpdownload	(cached)

Even go build on those packages are succesful :( but when run the overall test then it fails as above, not able to figure out what open /tmp/go-build349688409/b531/importcfg: no such file or directory means.

12:20 $ go build github.com/minishift/minishift/pkg/util/ocpdownload

12:20 $ go build github.com/minishift/minishift/pkg/util/shell

12:21 $ go build github.com/minishift/minishift/pkg/util/strings

12:21 $ go build github.com/minishift/minishift/cmd/minishift/cmd

@ianlancetaylor ianlancetaylor changed the title from test: go test fails with /tmp/go-build403193460/b531/importcfg: no such file or directory to cmd/go: go test fails with /tmp/go-build403193460/b531/importcfg: no such file or directory Oct 1, 2018

@ianlancetaylor ianlancetaylor added this to the Go1.12 milestone Oct 1, 2018

@bcmills

This comment has been minimized.

Member

bcmills commented Nov 14, 2018

@praveenkumar, I notice this was filed against go1.10.4. Are you still able to reproduce it using go1.11?

@bcmills

This comment has been minimized.

Member

bcmills commented Nov 14, 2018

@praveenkumar, I tried to reproduce the issue myself at HEAD, but it seems that the project requires some outside steps to build. Can you distill out a reproduction that does not require a Makefile for preprocessing?

gopath/src/github.com/minishift/minishift$ GO111MODULE=off go test "-tags containers_image_openpgp containers_image_ostree_stub exclude_graphdriver_btrfs exclude_graphdriver_devicemapper exclude_graphdriver_overlay" "-ldflags=-X github.com/minishift/minishift/pkg/version.minishiftVersion=1.24.0 -X github.com/minishift/minishift/pkg/version.b2dIsoVersion=v1.3.0 -X github.com/minishift/minishift/pkg/version.centOsIsoVersion=v1.12.0 -X github.com/minishift/minishift/pkg/version.openshiftVersion=v3.x.x -X github.com/minishift/minishift/pkg/version.commitSha=aa3dd4c8 -X github.com/minishift/minishift/pkg/version.cdkVersion=x.x.x-dev-1" ./...
cmd/minishift/cmd/util/util.go:35:2: cannot find package "github.com/minishift/minishift/out/bindata" in any of:
        /tmp/tmp.5zpYM9TR9L/gopath/src/github.com/minishift/minishift/vendor/github.com/minishift/minishift/out/bindata (vendor tree)
        /usr/local/google/home/bcmills/go/src/github.com/minishift/minishift/out/bindata (from $GOROOT)
        /tmp/tmp.5zpYM9TR9L/gopath/src/github.com/minishift/minishift/out/bindata (from $GOPATH)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment