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

testing: no tests to run warning when running benchmarks #17603

Closed
mvdan opened this issue Oct 26, 2016 · 4 comments
Closed

testing: no tests to run warning when running benchmarks #17603

mvdan opened this issue Oct 26, 2016 · 4 comments
Milestone

Comments

@mvdan
Copy link
Member

mvdan commented Oct 26, 2016

Please answer these questions before submitting your issue. Thanks!

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

go version devel +517a44d Tue Oct 25 12:23:49 2016 +0000 linux/amd64

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

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/mvdan/go"
GORACE=""
GOROOT="/home/mvdan/tip"
GOTOOLDIR="/home/mvdan/tip/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build943520682=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"

What did you do?

go test -run='^$' -bench=. on a package of mine with benchmarks.

What did you expect to see?

 $ go test -run='^$' -bench=.
BenchmarkFprint-4         300000              5056 ns/op
PASS
ok      github.com/mvdan/sh/printer     1.574s

What did you see instead?

 $ go test -run='^$' -bench=.
testing: warning: no tests to run
BenchmarkFprint-4         300000              5056 ns/op
PASS
ok      github.com/mvdan/sh/printer     1.574s [no tests to run]

The [no tests to run] doesn't bother me, but the extra line at the beginning does. I think this should be turned off if any benchmarks are run.

Happy to submit a patch today if this makes sense.

@mvdan
Copy link
Member Author

mvdan commented Oct 26, 2016

CC @rsc @mpvl

@mpvl
Copy link
Contributor

mpvl commented Oct 26, 2016

I'm fine with turning this off when running benchmarks.

@mvdan
Copy link
Member Author

mvdan commented Oct 26, 2016

Cool, will send a CL soon.

@bradfitz bradfitz added this to the Go1.8 milestone Oct 26, 2016
@gopherbot
Copy link

CL https://golang.org/cl/32157 mentions this issue.

@golang golang locked and limited conversation to collaborators Nov 1, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants