Under Windows, try to use the first interface that looks like Ethernet
authorgerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Mar 2007 23:55:00 +0000 (23:55 +0000)
committergerald <gerald@f5534014-38df-0310-8fa8-9805f1628bb7>
Tue, 6 Mar 2007 23:55:00 +0000 (23:55 +0000)
as the capture interface.  This should fix the capture test failures on
the Windows builder.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@20989 f5534014-38df-0310-8fa8-9805f1628bb7

test/config.sh

index d70f9ad6b74f8b748e5a0d1a7990539f3e522e2c..cb640b1c6c099d9333e13e6a45383e42d60a837a 100644 (file)
@@ -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)