Tests: Add a check for color support when printing status
authorChristian Babeux <christian.babeux@efficios.com>
Mon, 24 Sep 2012 16:11:44 +0000 (12:11 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 24 Sep 2012 20:25:01 +0000 (16:25 -0400)
commit2d7e012dc1d47b55bf37e05d9c2a76bad7620e31
tree824d2d06d7bdf7b5856a839a352441995598ba35
parent2f70b271351fe2b7befc4e327503f7c13a57dcd5
Tests: Add a check for color support when printing status

When printing the status of test is OK or FAIL, check if stdout is
attached to a terminal device. This way the output is not cluttered with
useless escape characters. Some use cases where we don't want colors:

$ ./sometest | less

$ ./sometest > a.log

Signed-off-by: Christian Babeux <christian.babeux@efficios.com>
Signed-off-by: David Goulet <dgoulet@efficios.com>
tests/utils.h
This page took 0.025228 seconds and 4 git commands to generate.