aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2015-01-02 17:20:46 +0000
committerGraham Bloice <graham.bloice@trihedral.com>2015-01-12 10:22:40 +0000
commita49e1d54d95548475d670b766bd328a73afa427b (patch)
treec6621769ef79e577831e48cb9ac22acf5101cf77 /test
parent2619eddee8414015c5cc5e9c034b3dc345e8e2cf (diff)
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>
Diffstat (limited to 'test')
-rwxr-xr-xtest/test.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test.sh b/test/test.sh
index c7a2ac1d5c..7d346a0a5e 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -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 ;;