How to show build errors in tests?

In my project

  • go build succeeds
  • go test fails with [build failed] with just a package name.

How can I see build errors in test files in general? Or at least in which file the error is?

As it is, all I can do is to open all files in the package in hope that IDE will highlight the error for me.

Can you show each command and the output? For example:

~/P/dotconfig (main|✔) $ go build
~/P/dotconfig (main|✔) $ go test
PASS
ok      github.com/DeanPDX/dotconfig    0.147s
~/P/dotconfig (main|✔) $