]> git.baikalelectronics.ru Git - kernel.git/commit
kunit: tool: Do not colorize output when redirected
authorKees Cook <keescook@chromium.org>
Thu, 24 Feb 2022 05:53:50 +0000 (21:53 -0800)
committerShuah Khan <skhan@linuxfoundation.org>
Mon, 4 Apr 2022 21:23:50 +0000 (15:23 -0600)
commit112e5ee2e64000e772bebdd0d11102e6dc6fa1e6
treec2a81bf20a04c6fcd4e138bbd811c97539514ade
parentd21e448d00521f343ae27de014de5ed59db8bf01
kunit: tool: Do not colorize output when redirected

Filling log files with color codes makes diffs and other comparisons
difficult. Only emit vt100 codes when the stdout is a TTY.

Cc: Brendan Higgins <brendanhiggins@google.com>
Cc: linux-kselftest@vger.kernel.org
Cc: kunit-dev@googlegroups.com
Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: David Gow <davidgow@google.com>
Reviewed-by: Brendan Higgins <brendanhiggins@google.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
tools/testing/kunit/kunit_parser.py