tests/ofproto-dpif.at: Portability improvement
authorYAMAMOTO Takashi <yamamoto@valinux.co.jp>
Fri, 20 Dec 2013 10:31:01 +0000 (19:31 +0900)
committerBen Pfaff <blp@nicira.com>
Fri, 20 Dec 2013 15:54:49 +0000 (07:54 -0800)
The output of "wc -l" have leading spaces on some platforms.
(NetBSD, OSX, ...)

This fixes a test failure introduced by commit e79a6c83.
("ofproto: Handle flow installation and eviction in upcall.")

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: Ben Pfaff <blp@nicira.com>
tests/ofproto-dpif.at

index 9cd2393..e813147 100644 (file)
@@ -2105,13 +2105,9 @@ sleep 1
 OVS_VSWITCHD_STOP
 ovs-appctl -t test-netflow exit
 
-AT_CHECK([grep "192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l], [0], [dnl
-1
-], [ignore])
+AT_CHECK([test `grep "192.168.0.1 > 192.168.0.2, if 1 > 65535, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l` -eq 1])
 
-AT_CHECK([grep "192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l], [0], [dnl
-1
-], [ignore])
+AT_CHECK([test `grep "192.168.0.1 > 192.168.0.2, if 1 > 2, 1 pkts, 60 bytes, ICMP 8:0" netflow.log | wc -l` -eq 1])
 
 combined=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 2 pkts, 120 bytes, ICMP 0:0" netflow.log | wc -l`
 separate=`grep "192.168.0.2 > 192.168.0.1, if 2 > 1, 1 pkts, 60 bytes, ICMP 0:0" netflow.log | wc -l`