selftests/futex: Check ANSI terminal color support
[cascardo/linux.git] / tools / testing / selftests / futex / run.sh
1 #!/bin/sh
2
3 ###############################################################################
4 #
5 #   Copyright © International Business Machines  Corp., 2009
6 #
7 #   This program is free software;  you can redistribute it and/or modify
8 #   it under the terms of the GNU General Public License as published by
9 #   the Free Software Foundation; either version 2 of the License, or
10 #   (at your option) any later version.
11 #
12 # DESCRIPTION
13 #      Run all tests under the functional, performance, and stress directories.
14 #      Format and summarize the results.
15 #
16 # AUTHOR
17 #      Darren Hart <dvhart@linux.intel.com>
18 #
19 # HISTORY
20 #      2009-Nov-9: Initial version by Darren Hart <dvhart@linux.intel.com>
21 #
22 ###############################################################################
23
24 # Test for a color capable shell and pass the result to the subdir scripts
25 USE_COLOR=0
26 tput setf 7 || tput setaf 7
27 if [ $? -eq 0 ]; then
28     USE_COLOR=1
29     tput sgr0
30 fi
31 export USE_COLOR
32
33 (cd functional; ./run.sh)