summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnel Husakovic <anel@mariadb.org>2019-07-31 02:21:03 -0700
committerAnel Husakovic <anel@mariadb.org>2019-07-31 02:21:10 -0700
commit372b3c6aff132eb143164c1fde6a86d0b6e8efee (patch)
treeb865dce887b8382b7aec1b9cccde896dfe9488b2
parentf8a1a262e27bc9a42364c90601dd922dff9a210b (diff)
downloadmariadb-git-372b3c6aff132eb143164c1fde6a86d0b6e8efee.tar.gz
MDEV-20223 Add colors to mtr in case of STDINbb-5.5-anel-mtr_color
-rw-r--r--mysql-test/lib/mtr_report.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/lib/mtr_report.pm b/mysql-test/lib/mtr_report.pm
index 5e42b342df1..7a7753d9b2d 100644
--- a/mysql-test/lib/mtr_report.pm
+++ b/mysql-test/lib/mtr_report.pm
@@ -46,7 +46,7 @@ my %color_map = qw/pass green
skipped yellow
reset reset/;
sub xterm_color {
- if (-t STDOUT and defined $ENV{TERM} and $ENV{TERM} =~ /xterm/) {
+ if (-t STDOUT and defined $ENV{TERM} and $ENV{TERM} =~ /xterm/ or -t STDIN) {
syswrite STDOUT, color($color_map{$_[0]});
}
}