Skip to content
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' with --list flag does not respect --tags #31021

Open
evanlinjin opened this Issue Mar 25, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@evanlinjin
Copy link

evanlinjin commented Mar 25, 2019

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

$ go version
go version go1.12 darwin/amd64

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
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/evanlinjin/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/evanlinjin/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/Cellar/go/1.12/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.12/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/evanlinjin/GolandProjects/skywire/go.mod"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/by/x6wf0dg96xjg067sk903rnjw0000gn/T/go-build639156632=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

$ git clone `https://github.com/evanlinjin/gotestlisttags.git`
$ go test --tags="not_ignored" --list="Test" .

What did you expect to see?

➜  gotestlisttags git:(master) ✗ go test --tags="not_ignored" --list="Test" .
TestShouldNotBeIgnored
ok      gotestlisttags  0.006s

What did you see instead?

➜  gotestlisttags git:(master) ✗ go test --tags="not_ignored" --list="Test" .
TestShouldBeIgnored
TestShouldNotBeIgnored
ok      gotestlisttags  0.006s

@bcmills bcmills changed the title go test with --list flag does not respect --tags cmd/go: 'go test' with --list flag does not respect --tags Apr 12, 2019

@bcmills

This comment has been minimized.

Copy link
Member

bcmills commented Apr 12, 2019

@bcmills

This comment has been minimized.

Copy link
Member

bcmills commented Apr 12, 2019

For small examples like this one, please include the code listing directly in the issue, not just a link to a repo. Our first-level triage is done by reading the issue, not running things on the command line. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.