cmd/go: go test -i doesn't work if there are no Go files in the current directory. #3896

Closed
rogpeppe opened this Issue Aug 2, 2012 · 4 comments

Comments

Projects
None yet
5 participants
Contributor

rogpeppe commented Aug 2, 2012

% go test ./...
warning: building out-of-date packages:
    launchpad.net/gocheck
    launchpad.net/goamz/ec2/ec2test
    launchpad.net/goamz/s3/s3test
    labix.org/v2/mgo
    launchpad.net/lpad
installing these packages with 'go test -i ./...' will speed future tests.

[...]
% go test -i ./...
can't load package: package launchpad.net/juju-core: no Go source files in
/home/rog/src/go/src/launchpad.net/juju-core
%
Contributor

robpike commented Aug 2, 2012

Comment 1:

Labels changed: added priority-later, removed priority-triage.

Owner changed to @rsc.

Status changed to Accepted.

Contributor

fsouza commented Aug 2, 2012

Comment 2:

go test -i ./... works with multiple directories. It does not work only when one of the
files use relative imports.
In juju source, if you drop the relative import from the file version/version_test.go
(using launchpad.net/juju-core/version instead), go test -i ./... works fine.
When I just met this problem, I was going to report it, but I think I've just forgot
about it.
Contributor

fsouza commented Aug 3, 2012

Comment 3:

Here is a patch: http://golang.org/cl/6457075/
Contributor

robpike commented Aug 15, 2012

Comment 4:

This issue was closed by revision 34976b9.

Status changed to Fixed.

@rogpeppe rogpeppe added fixed labels Aug 15, 2012

@gopherbot gopherbot locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.