浏览代码

selftests/futex: Check ANSI terminal color support

Because test for color support of the running shell does not aware ANSI
type terminals, it does not print colorful messages on some environemnt.
This commit modifies the test to aware ANSI type terminal, too.

Signed-off-by: SeongJae Park <sj38.park@gmail.com>
Acked-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
SeongJae Park 8 年之前
父节点
当前提交
fecf861e76
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      tools/testing/selftests/futex/functional/run.sh
  2. 1 1
      tools/testing/selftests/futex/run.sh

+ 1 - 1
tools/testing/selftests/futex/functional/run.sh

@@ -24,7 +24,7 @@
 
 # Test for a color capable console
 if [ -z "$USE_COLOR" ]; then
-    tput setf 7
+    tput setf 7 || tput setaf 7
     if [ $? -eq 0 ]; then
         USE_COLOR=1
         tput sgr0

+ 1 - 1
tools/testing/selftests/futex/run.sh

@@ -23,7 +23,7 @@
 
 # Test for a color capable shell and pass the result to the subdir scripts
 USE_COLOR=0
-tput setf 7
+tput setf 7 || tput setaf 7
 if [ $? -eq 0 ]; then
     USE_COLOR=1
     tput sgr0