mafia icon indicating copy to clipboard operation
mafia copied to clipboard

Improve the way test output is handled

Open erikd opened this issue 7 years ago • 2 comments

Been using stack a little for work and comparing how it does things in comparison to mafia.

One of the nice things stack test is show the fully colourized and on-the-fly Hedgehog test output whereas mafia just prints it out the whole test output chunk once the test is complete.

The stack way is simply nicer and couldn't be too hard to do.

erikd avatar Apr 11 '18 00:04 erikd

The main issue here is that mafia test just calls cabal test which disconnects the tty, so hedgehog thinks that it's being piped to a file on disk.

To fix this without fixing it in cabal, we'd just have to read the test suites from the .cabal file and execute them manually. I believe mafia already depends on the Cabal library so parsing the .cabal file shouldn't be a big deal.

jacobstanley avatar Apr 11 '18 01:04 jacobstanley

My first step was going to be to trawl through the stack code to figure out how it does it, but your suggestion sounds plausible.

erikd avatar Apr 11 '18 01:04 erikd