]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/ftrace: Use colored output when available
authorDaniel Díaz <daniel.diaz@linaro.org>
Tue, 16 Oct 2018 17:02:20 +0000 (12:02 -0500)
committerShuah Khan (Samsung OSG) <shuah@kernel.org>
Wed, 24 Oct 2018 20:49:37 +0000 (14:49 -0600)
commit27d385af67e21f811120668c7fa9bbf0eb16daab
tree2163b004622369bec41ef9df44c042b640134497
parent880d5d4b5430d65a514fd8b99f065b047bcda258
selftests/ftrace: Use colored output when available

If test is being directly executed (with stdout opened on the
terminal) and the terminal capabilities indicate enough
colors, then use the existing scheme of green, red, and blue
to show when tests pass, fail or end in a different way.

When running the tests redirecting the stdout, for instance,
to a file, then colors are not shown, thus producing a more
readable output.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
tools/testing/selftests/ftrace/ftracetest