Make running the tests a little easier on Windows

1.  Set the igncr option a little differently, this is the preferred
    way according to the latest Cygwin bash update announcement
    (See https://sourceware.org/ml/cygwin-announce/2014-10/msg00015.html, Sect 4a)
    The previous way didn't work for me.
2.  Ensure /usr/bin is on the path if running under Cygwin.
    I really don't want Cygwin on my normal paths, the build process
    adds if required, so this change makes the test scripts do the same.

Change-Id: I0f4da1fa87802bf0a4039bb5a91e577fae506d79
Reviewed-on: https://code.wireshark.org/review/6243
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Graham Bloice <graham.bloice@trihedral.com>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Graham Bloice <graham.bloice@trihedral.com>
This commit is contained in:
Graham Bloice 2015-01-02 17:20:46 +00:00
parent 2619eddee8
commit a49e1d54d9
1 changed files with 8 additions and 3 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
(shopt -s igncr) 2>/dev/null && shopt -s igncr; # comment is needed
# # hack for cygwin bash
# # no-op for other
(set -o igncr) 2>/dev/null && set -o igncr; # comment is needed
# # hack for cygwin bash
# # no-op for other
#
# Test various command line testable aspects of the Wireshark tools
#
@ -29,6 +29,11 @@ USE_COLOR=1
RUN_SUITE=""
PRINT_USAGE=0
# Ensure cygwin bin dir is on the path if running under it
if [[ $OSTYPE == "cygwin" ]]; then
PATH="/usr/bin:$PATH"
fi
while getopts "chs:" OPTION ; do
case $OPTION in
c) USE_COLOR=0 ;;