aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2007-03-06 23:55:00 +0000
committerGerald Combs <gerald@wireshark.org>2007-03-06 23:55:00 +0000
commit773cd3dee8dc175c954def3af51154aff3c95427 (patch)
treed0fddec175225b6648820cfa2933192c2742fd56 /test
parent7a213ffb157cc7e3babc18eb508b6f05ef709d29 (diff)
Under Windows, try to use the first interface that looks like Ethernet
as the capture interface. This should fix the capture test failures on the Windows builder. svn path=/trunk/; revision=20989
Diffstat (limited to 'test')
-rw-r--r--test/config.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/test/config.sh b/test/config.sh
index d70f9ad6b7..cb640b1c6c 100644
--- a/test/config.sh
+++ b/test/config.sh
@@ -47,7 +47,13 @@ DUMPCAP=$WS_BIN_PATH/dumpcap
# interface with at least a few packets/sec traffic on it
# (e.g. start a web radio to generate some traffic :-)
# an interfaces index (1 based) should do well for recent devbuilds
-TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-2}
+if [ "$WS_SYSTEM" = "Windows" -a -z "$TRAFFIC_CAPTURE_IFACE" ] ; then
+ # Try to fetch the first Ethernet interface.
+ TRAFFIC_CAPTURE_IFACE=`$TSHARK -D | \
+ egrep 'Ethernet|Network Connection' | \
+ head -1 | cut -c 1`
+fi
+TRAFFIC_CAPTURE_IFACE=${TRAFFIC_CAPTURE_IFACE:-1}
# time to capture some traffic (in seconds)
# (you may increase this if you get errors caused by very low traffic)