aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-08 16:59:30 +0000
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>2007-11-08 16:59:30 +0000
commitdb569613f80dafdb807e7ccf7424dd6035cca9f0 (patch)
treec8a4fe401ce457761490f0f15899ccad885651a6 /test
parentb7aeb9787389b023d4e65f36773a5eee85edb581 (diff)
Move SKIP_CAPTURE from suite-capture.sh to config.sh so that we can use it
in suite-clopts as well. Allow it to be set externally. This should fix the "test" failure in the Solairs builder. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@23399 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'test')
-rwxr-xr-xtest/config.sh22
-rwxr-xr-xtest/suite-capture.sh7
-rwxr-xr-xtest/suite-clopts.sh2
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"