How to suppress [no test files] message on go test

go, testing

Solution

Something like this?

mkfifo /tmp/fifo-$$

grep -v 'no test files' </tmp/fifo-$$ & go test ./... >/tmp/fifo-$$
RES=$?
rm /tmp/fifo-$$
exit $RES

Problem

I'm running `go test ./...` in the root of my project but several packages don't have any tests and report `[no test files]`. If I run `go test ./... | grep -v 'no test files'` I lose the return code from `go test` in case a test fails. Can I ignore packages with no tests while recursively testing everything from the root of the project?

Original source