aboutsummaryrefslogtreecommitdiff
path: root/tests/framework/command_line/CommonOptions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/framework/command_line/CommonOptions.cpp')
-rw-r--r--tests/framework/command_line/CommonOptions.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/framework/command_line/CommonOptions.cpp b/tests/framework/command_line/CommonOptions.cpp
index 631981be3d..e0b93f6830 100644
--- a/tests/framework/command_line/CommonOptions.cpp
+++ b/tests/framework/command_line/CommonOptions.cpp
@@ -26,6 +26,7 @@
#include "../Framework.h"
#include "../printers/Printers.h"
#include "CommandLineParser.h"
+#include <unistd.h>
namespace arm_compute
{
@@ -42,7 +43,7 @@ CommonOptions::CommonOptions(CommandLineParser &parser)
log_file(parser.add_option<SimpleOption<std::string>>("log-file")),
log_level(),
throw_errors(parser.add_option<ToggleOption>("throw-errors")),
- color_output(parser.add_option<ToggleOption>("color-output", true)),
+ color_output(parser.add_option<ToggleOption>("color-output", isatty(STDOUT_FILENO))), // Only enable colors by default if we're running in a terminal
pretty_console(parser.add_option<ToggleOption>("pretty-console", false)),
json_file(parser.add_option<SimpleOption<std::string>>("json-file")),
pretty_file(parser.add_option<SimpleOption<std::string>>("pretty-file")),