tests: Adjust output of vconn for windows.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 15 Jun 2015 15:13:06 +0000 (08:13 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 23 Jun 2015 14:10:10 +0000 (07:10 -0700)
Recent tests added for openflow atomic bundle support
looks for Linux specific output in logs. Adjust them
so that tests pass in Windows too.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
tests/ofproto-macros.at
tests/ofproto.at
tests/ovs-ofctl.at

index 83b2480..74b02b7 100644 (file)
@@ -16,7 +16,7 @@ s/ hard_age=[0-9]*,//
 }
 
 # Filter (multiline) vconn debug messages from ovs-vswitchd.log.
-# Use with ofctl_strip()
+# Use with vconn_windows_sub() and ofctl_strip()
 print_vconn_debug () { awk -F\| < ovs-vswitchd.log '
 BEGIN { prt=0 }
 /\|vconn\|DBG\|/ { sub(/[ \t]*$/, ""); print $3 "|" $4 "|" $5; prt=1; next }
@@ -25,6 +25,13 @@ prt==1 { sub(/[ \t]*$/, ""); print $0 }
 '
 }
 
+vconn_windows_sub() {
+    sed '
+s/tcp:127.0.0.1:[0-9][0-9]*:/unix:/
+s/No error/Success/
+'
+}
+
 # parse_listening_port [SERVER]
 #
 # Parses the TCP or SSL port on which a server is listening from the
index c3feaba..a7f021d 100644 (file)
@@ -3510,8 +3510,8 @@ NXST_FLOW reply:
 
 dnl Check logs for OpenFlow trace
 # Prevent race.
-OVS_WAIT_UNTIL([test `grep -- "|vconn|DBG|unix: sent (Success): NXST_FLOW reply" ovs-vswitchd.log | wc -l` -ge 3])
-AT_CHECK([print_vconn_debug | ofctl_strip], [0], [dnl
+OVS_WAIT_UNTIL([cat ovs-vswitchd.log | vconn_windows_sub | test `grep -- "|vconn|DBG|unix: sent (Success): NXST_FLOW reply" | wc -l` -ge 3])
+AT_CHECK([print_vconn_debug | vconn_windows_sub | ofctl_strip], [0], [dnl
 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
  version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
 vconn|DBG|unix: received: OFPT_HELLO:
index 6c48569..f20f2da 100644 (file)
@@ -2834,9 +2834,9 @@ AT_CHECK([ovs-ofctl -O OpenFlow14 dump-flows br0 | ofctl_strip | sed '/OFPST_FLO
 
 dnl Check logs for OpenFlow trace
 # Prevent race.
-OVS_WAIT_UNTIL([test `grep -- "|vconn|DBG|unix: sent (Success): OFPST_FLOW reply" ovs-vswitchd.log | wc -l` -ge 2])
+OVS_WAIT_UNTIL([cat ovs-vswitchd.log | vconn_windows_sub | test `grep -- "|vconn|DBG|unix: sent (Success): OFPST_FLOW reply" | wc -l` -ge 2])
 # AT_CHECK([sed -n "s/^.*\(|vconn|DBG|.*xid=.*:\).*$/\1/p" ovs-vswitchd.log], [0], [dnl
-AT_CHECK([print_vconn_debug | ofctl_strip], [0], [dnl
+AT_CHECK([print_vconn_debug | vconn_windows_sub | ofctl_strip], [0], [dnl
 vconn|DBG|unix: sent (Success): OFPT_HELLO (OF1.5):
  version bitmap: 0x01, 0x02, 0x03, 0x04, 0x05, 0x06
 vconn|DBG|unix: received: OFPT_HELLO (OF1.4):