New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way for test suites to print colors #2911

Closed
nomeata opened this Issue Nov 5, 2015 · 2 comments

Comments

Projects
None yet
2 participants
@nomeata
Copy link
Contributor

nomeata commented Nov 5, 2015

Hi,

with the current code, the stdout of a test suite is always attached to a pipe (and previously to a file), never to the terminal directly. This is unfortunate, as many test frameworks provide nice and useful coloring if attached to a terminal.

I suggest to add yet a nother mode to --show-detail that is direct: Like streaming, but it connects the test output directly to a terminal. It would not save a log file in this case, but that is ok.

In this case, no worrying thread spawning and lazy IO is requires, so this would also be a work-around for #2398.

CC’ing @ttuegel.

Thanks,
Joachim

nomeata added a commit to nomeata/cabal that referenced this issue Nov 5, 2015

test: New mode --show-details=direct
This mode implements haskell#2911, and allows to connect the test runner
directly to stdout/stdin. This is more reliable in the presence of no
threading, i.e. a work-arond for haskell#2398.

I make the test suite use this, so that it passes again, despite
printing lots of stuff. Once haskell#2398 is fixed properly, the test suite
should probably be extended to test all the various --show-details
modes.

nomeata added a commit to nomeata/cabal that referenced this issue Nov 5, 2015

test: New mode --show-details=direct
This mode implements haskell#2911, and allows to connect the test runner
directly to stdout/stdin. This is more reliable in the presence of no
threading, i.e. a work-arond for haskell#2398.

I make the test suite use this, so that it passes again, despite
printing lots of stuff. Once haskell#2398 is fixed properly, the test suite
should probably be extended to test all the various --show-details
modes.
@nomeata

This comment has been minimized.

Copy link
Contributor

nomeata commented Nov 5, 2015

This is implemented in PR #2913.

nomeata added a commit to nomeata/cabal that referenced this issue Nov 7, 2015

test: New mode --show-details=direct
This mode implements haskell#2911, and allows to connect the test runner
directly to stdout/stdin. This is more reliable in the presence of no
threading, i.e. a work-arond for haskell#2398.

I make the test suite use this, so that it passes again, despite
printing lots of stuff. Once haskell#2398 is fixed properly, the test suite
should probably be extended to test all the various --show-details
modes.
@BardurArantsson

This comment has been minimized.

Copy link
Collaborator

BardurArantsson commented Nov 8, 2015

#2913 was merged. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment