Skip to content

cmd/go: go test -c does not apply specified gcflags to the test package #22831

@aarzilli

Description

@aarzilli

Please answer these questions before submitting your issue. Thanks!

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

go version devel +5f29a7a Mon Nov 20 20:29:43 2017 +0000 linux/amd64

What did you do?

go get github.com/aarzilli/testflags
cd $GOPATH/src/github.com/aarzilli/testflags
go clean -cache && go test -c -gcflags '-N -l'

What did you expect to see?

flags -N -l applied to the test package (i.e. the one defined in main_test.go)

What did you see instead?

The flags are applied to github.com/aarzilli/testflags but not to the test package.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions