diff options
-rwxr-xr-x | test/config.sh | 22 | ||||
-rwxr-xr-x | test/suite-capture.sh | 7 | ||||
-rwxr-xr-x | test/suite-clopts.sh | 2 |
3 files changed, 16 insertions, 15 deletions
diff --git a/test/config.sh b/test/config.sh index acc107257b..7f81d784f4 100755 --- a/test/config.sh +++ b/test/config.sh @@ -31,11 +31,17 @@ else WS_SYSTEM=`uname -s` fi -# path to the Wireshark binaries, only used for the settings below + +# Path to the Wireshark binaries, only used for the settings below +WS_BIN_PATH=.. + +# Are we allowed to open interfaces or capture on this system? +SKIP_CAPTURE=${SKIP_CAPTURE:-1} + +# Override the last two items if we're running Windows if [ "$WS_SYSTEM" = "Windows" ] ; then WS_BIN_PATH=../wireshark-gtk2 -else - WS_BIN_PATH=.. + SKIP_CAPTURE=0 fi # Tweak the following to your liking. @@ -64,11 +70,11 @@ TRAFFIC_CAPTURE_DURATION=60 # if you need promiscuous mode, comment this line out TRAFFIC_CAPTURE_PROMISC=-p -# only test capturing from a fifo if we're not on Windows -# and we have a mkfifo. (Windows cygwin has a mkfifo but -# Windows dumpcap & etc use Windows named pipes which -# are different than the cygwin named pipes). -# +# only test capturing from a fifo if we're not on Windows +# and we have a mkfifo. (Windows cygwin has a mkfifo but +# Windows dumpcap & etc use Windows named pipes which +# are different than the cygwin named pipes). +# if [ "$WS_SYSTEM" != "Windows" ] && which mkfifo &>/dev/null ; then TEST_FIFO=1 fi diff --git a/test/suite-capture.sh b/test/suite-capture.sh index 0a310a595e..12ed91684f 100755 --- a/test/suite-capture.sh +++ b/test/suite-capture.sh @@ -29,11 +29,6 @@ EXIT_OK=0 EXIT_COMMAND_LINE=1 EXIT_ERROR=2 -case $WS_SYSTEM in - Windows|SunOS) SKIP_CAPTURE=0 ;; - *) SKIP_CAPTURE=1 ;; -esac - capture_test_output_print() { wait for f in "$@"; do @@ -49,7 +44,7 @@ traffic_gen_ping() { # Generate some traffic for quiet networks. # This will have to be adjusted for non-Windows systems. { - date + date for (( x=20; x<=50; x++ )) # in effect: number the packets do # How does ping _not_ have a standard set of arguments? diff --git a/test/suite-clopts.sh b/test/suite-clopts.sh index d1b37dfc0a..6c751d0ff8 100755 --- a/test/suite-clopts.sh +++ b/test/suite-clopts.sh @@ -95,7 +95,7 @@ clopts_suite_valid_chars() { clopts_suite_interface_chars() { for index in D L do - if [ "$WS_SYSTEM" = "Windows" ] ; then + if [ "$SKIP_CAPTURE" -eq 0 ] ; then test_step_add "Valid TShark parameter -$index, exit status must be $EXIT_OK" "test_single_char_options $TSHARK $index $EXIT_OK" else test_step_add "Invalid permissions for TShark parameter -$index, exit status must be $EXIT_ERROR" "test_single_char_options $TSHARK $index $EXIT_ERROR" |