aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAlexis La Goutte <alexis.lagoutte@gmail.com>2014-12-22 16:29:01 +0100
committerAnders Broman <a.broman58@gmail.com>2014-12-23 07:27:48 +0000
commitcd558218f7816481b27ed2342062df573df8ab89 (patch)
tree9f4d2b86fdc0762d9675fab4ab26e598e651ee77 /test
parentc3d70804853b684e34597ad16267280330a8be70 (diff)
test suite: fix indent (use tabs) and add modelines
Change-Id: I648d02d41f92c7fd176ce194eee20a2d19643fe0 Reviewed-on: https://code.wireshark.org/review/5985 Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'test')
-rwxr-xr-xtest/config.sh10
-rwxr-xr-xtest/suite-capture.sh4
-rwxr-xr-xtest/test.sh97
3 files changed, 61 insertions, 50 deletions
diff --git a/test/config.sh b/test/config.sh
index e7306668eb..fc28e98874 100755
--- a/test/config.sh
+++ b/test/config.sh
@@ -70,10 +70,10 @@ DUMPCAP=$WS_BIN_PATH/dumpcap
# (e.g. start a web radio to generate some traffic :-)
# an interfaces index (1 based) should do well for recent devbuilds
if [ "$WS_SYSTEM" = "Windows" -a -z "$TRAFFIC_CAPTURE_IFACE" ] ; then
- # Try to fetch the first Ethernet interface.
- TRAFFIC_CAPTURE_IFACE=`$TSHARK -D 2>&1 | \
- egrep 'Ethernet|Network Connection|VMware|Intel|Realtek' | \
- head -1 | cut -c 1`
+ # Try to fetch the first Ethernet interface.
+ TRAFFIC_CAPTURE_IFACE=`$TSHARK -D 2>&1 | \
+ egrep 'Ethernet|Network Connection|VMware|Intel|Realtek' | \
+ head -1 | cut -c 1`
fi
TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-1}
@@ -92,7 +92,7 @@ TRAFFIC_CAPTURE_PROMISC=-p
# are different than the cygwin named pipes).
#
if [ "$WS_SYSTEM" != "Windows" ] && which mkfifo &>/dev/null ; then
- TEST_FIFO=1
+ TEST_FIFO=1
fi
# Tell Wireshark to quit after capuring packets.
diff --git a/test/suite-capture.sh b/test/suite-capture.sh
index b624b7074b..5720fdd7f7 100755
--- a/test/suite-capture.sh
+++ b/test/suite-capture.sh
@@ -63,7 +63,7 @@ traffic_gen_ping() {
done
date
} > ./testout_ping.txt 2>&1 &
- PING_PID=$!
+ PING_PID=$!
}
ping_cleanup() {
@@ -87,7 +87,7 @@ capture_step_10packets() {
date > ./testout.txt
$DUT -i $TRAFFIC_CAPTURE_IFACE $TRAFFIC_CAPTURE_PROMISC \
-w ./testout.pcap \
- -c 10 \
+ -c 10 \
-a duration:$TRAFFIC_CAPTURE_DURATION \
-f icmp \
>> ./testout.txt 2>&1
diff --git a/test/test.sh b/test/test.sh
index 879d720088..abc3969dc2 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -30,12 +30,12 @@ RUN_SUITE=""
PRINT_USAGE=0
while getopts "chs:" OPTION ; do
- case $OPTION in
- c) USE_COLOR=0 ;;
- h) PRINT_USAGE=1 ;;
- s) RUN_SUITE="$OPTARG" ;;
- *) echo "Unknown option: " $OPTION $OPTARG
- esac
+ case $OPTION in
+ c) USE_COLOR=0 ;;
+ h) PRINT_USAGE=1 ;;
+ s) RUN_SUITE="$OPTARG" ;;
+ *) echo "Unknown option: " $OPTION $OPTARG
+ esac
done
shift $(( $OPTIND - 1 ))
@@ -80,10 +80,10 @@ HOME_PATH="$TEST_OUTDIR/home"
CONF_PATH="$HOME_PATH/.wireshark"
if [ "$WS_SYSTEM" == "Windows" ] ; then
- HOME_ENV="APPDATA"
- HOME_PATH="`cygpath -w $HOME_PATH`"
- CONF_PATH="$HOME_PATH/Wireshark"
- CAPTURE_DIR="`cygpath -w $CAPTURE_DIR`"
+ HOME_ENV="APPDATA"
+ HOME_PATH="`cygpath -w $HOME_PATH`"
+ CONF_PATH="$HOME_PATH/Wireshark"
+ CAPTURE_DIR="`cygpath -w $CAPTURE_DIR`"
fi
mkdir -p $CONF_PATH
@@ -130,7 +130,7 @@ test_step_prerequisites() {
# Dump version information
test_step_tshark_version() {
- test_remark_add "Printing TShark version"
+ test_remark_add "Printing TShark version"
$TSHARK -v
RETURNVALUE=$?
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
@@ -173,38 +173,38 @@ test_set_output VERBOSE
#test_suite_show "All" test_suite
if [ -n "$RUN_SUITE" ] ; then
- case $RUN_SUITE in
- "all")
- test_suite_run "All" test_suite
- exit $? ;;
- "capture")
- test_suite_run "Capture" capture_suite
- exit $? ;;
- "clopts")
- test_suite_run "Command line options" clopt_suite
- exit $? ;;
- "decryption")
- test_suite_run "Decryption" decryption_suite
- exit $? ;;
- "fileformats")
- test_suite_run "File formats" fileformats_suite
- exit $? ;;
- "io")
- test_suite_run "File I/O" io_suite
- exit $? ;;
- "nameres")
- test_suite_run "Name Resolution" name_resolution_suite
- exit $? ;;
- "prerequisites")
- test_suite_run "Prerequisites" prerequisites_suite
- exit $? ;;
- "unittests")
- test_suite_run "Unit tests" unittests_suite
- exit $? ;;
- "wslua")
- test_suite_run "Lua API" wslua_suite
- exit $? ;;
- esac
+ case $RUN_SUITE in
+ "all")
+ test_suite_run "All" test_suite
+ exit $? ;;
+ "capture")
+ test_suite_run "Capture" capture_suite
+ exit $? ;;
+ "clopts")
+ test_suite_run "Command line options" clopt_suite
+ exit $? ;;
+ "decryption")
+ test_suite_run "Decryption" decryption_suite
+ exit $? ;;
+ "fileformats")
+ test_suite_run "File formats" fileformats_suite
+ exit $? ;;
+ "io")
+ test_suite_run "File I/O" io_suite
+ exit $? ;;
+ "nameres")
+ test_suite_run "Name Resolution" name_resolution_suite
+ exit $? ;;
+ "prerequisites")
+ test_suite_run "Prerequisites" prerequisites_suite
+ exit $? ;;
+ "unittests")
+ test_suite_run "Unit tests" unittests_suite
+ exit $? ;;
+ "wslua")
+ test_suite_run "Lua API" wslua_suite
+ exit $? ;;
+ esac
fi
MENU_LEVEL=0
@@ -300,3 +300,14 @@ done
esac
done
+
+# Editor modelines
+#
+# Local Variables:
+# sh-basic-offset: 8
+# tab-width: 8
+# indent-tabs-mode: t
+# End:
+#
+# ex: set shiftwidth=8 tabstop=8 noexpandtab:
+# :indentSize=8:tabSize=8:noTabs=false: