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

Comments

Projects
None yet
4 participants
@mvdan
Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

commented Oct 26, 2016

CC @rsc @mpvl

@mpvl

This comment has been minimized.

Copy link
Member

commented Oct 26, 2016

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

@mvdan

This comment has been minimized.

Copy link
Member Author

commented Oct 26, 2016

Cool, will send a CL soon.

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

@gopherbot

This comment has been minimized.

Copy link

commented Oct 27, 2016

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

@gopherbot gopherbot closed this in 11ff4b2 Nov 1, 2016

@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.
You can’t perform that action at this time.