When I run a stack test
or a stack test <package>:<test-suite>
then the output looks something like:
package: configure (lib + exe + test)
package: build (lib + exe + test)
package: copy/register
package: test (suite: tests)
And it ends up basically compiling all my changes twice: once for the exe or lib and a second time for the test.
What I would like is a command like stack test --test-only
that would produce something like:
package: configure (test)
package: build (test)
package: copy/register
package: test (suite: tests)
I have already looked through the available command line flags and stack documentation. I have also attempted a google search to see if anyone has talked about something similar.
So my questions are:
1. What is the best currently available way to compile and run only the tests? My best guess on this one is to try putting the tests in a separate cabal package.
2. Is there some reason why stack doesn't or couldn't do this?