ovsdb-server.at: Use different test for socket files.
authorGurucharan Shetty <gshetty@nicira.com>
Mon, 2 Jun 2014 17:46:23 +0000 (10:46 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Thu, 26 Jun 2014 23:46:13 +0000 (16:46 -0700)
On Windows, we really do not have any "socket" files created.
We instead create a regular file with a TCP port number written
inside it.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
tests/ovsdb-server.at

index 77b7dc1..155d418 100644 (file)
@@ -384,14 +384,22 @@ AT_CHECK([ovsdb-server --detach --no-chdir --pidfile db])
 
 AT_CHECK([test ! -e socket1])
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket1])
-OVS_WAIT_UNTIL([test -S socket1])
+if test "$IS_WIN32" = "yes"; then
+  OVS_WAIT_UNTIL([test -s socket1])
+else
+  OVS_WAIT_UNTIL([test -S socket1])
+fi
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
   [0], [punix:socket1
 ])
 
 AT_CHECK([test ! -e socket2])
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/add-remote punix:socket2])
-OVS_WAIT_UNTIL([test -S socket2])
+if test "$IS_WIN32" = "yes"; then
+  OVS_WAIT_UNTIL([test -s socket2])
+else
+  OVS_WAIT_UNTIL([test -S socket2])
+fi
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
   [0], [punix:socket1
 punix:socket2
@@ -404,7 +412,11 @@ ovs-appctl: ovsdb-server: server returned an error
 
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/remove-remote punix:socket1])
 OVS_WAIT_UNTIL([test ! -e socket1])
-AT_CHECK([test -S socket2])
+if test "$IS_WIN32" = "yes"; then
+  AT_CHECK([test -s socket2])
+else
+  AT_CHECK([test -S socket2])
+fi
 AT_CHECK([ovs-appctl -t ovsdb-server ovsdb-server/list-remotes],
   [0], [punix:socket2
 ])