From Ed Beroset via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9245
authoreapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 8 Oct 2013 15:09:59 +0000 (15:09 +0000)
committereapache <eapache@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 8 Oct 2013 15:09:59 +0000 (15:09 +0000)
Fix test suite so that it doesn't attempt to use color if ncurses is not
installed.  This came up when I attempted to use the test suite under Windows
with cygwin installed but not ncurses.  The result is not entirely broken but
the error messages saying that "tput is not a valid command" make the menus and
results difficult to read.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@52449 f5534014-38df-0310-8fa8-9805f1628bb7

test/test-backend.sh

index 1dba9ba4d99140dceaea1a60e8d985bdb9583662..f9173027aff6f703f91688403f719146af54f8ab 100755 (executable)
 # http://www.tldp.org/LDP/abs/html/options.html
 # bash -u test.sh
 
+# make sure that tput (part of ncurses) is installed
+tput -V >/dev/null 2>/dev/null
+if [ ! $? -eq 0 ]; then
+       USE_COLOR=0
+fi
 
 # coloring the output
 if [ $USE_COLOR -eq 1 ] ; then