haskell/cabal — pull request #1727 by ttuegel (2014-03-17 13:38:47+00:00)
Title: Implement '--show-details=streaming' to show test logs in real-time

Addresses #928, #1581, and #1601.

I refactored the test runners for `detailed-0.9` and `exitcode-stdio-1.0` into their own modules. I need to overhaul the `detailed` runner; the current implementation can't show test logs in real-time.

`Distribution.Compat.CreatePipe` requires `hsc2hs`, so we cannot just `ghc --make Setup.hs` anymore. I modified the makefile so that `make Setup` does the right thing and updated the README accordingly.

To see it in action, just
```
make Setup
./Setup configure --enable-tests
./Setup build
./Setup test --show-details=streaming
```
`make Setup` builds `Setup` with `-threaded` which is necessary to see the logs in real-time. Without `-threaded`, `--show-details=streaming` is the same as `--show-details=always`.

We can bikeshed about whether `--show-details=streaming` should be the default. The number of times this issue has been reported at least shows that it's what new users expect.

@tibbe Are you able to test this on Mac? I've tested on Linux and Windows 7.