OVS daemon service for Windows creates the pidfile and then
registers with the Windows services manager that the service
is running. There is a small time gap between the two steps.
So retry a few times in the test.

Also, provide a keyword for the test.

Reported-by: Nithin Raju <nit...@vmware.com>
Signed-off-by: Gurucharan Shetty <gshe...@nicira.com>
---
 tests/daemon.at |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/daemon.at b/tests/daemon.at
index 4a6f341..dd7a3f4 100644
--- a/tests/daemon.at
+++ b/tests/daemon.at
@@ -161,6 +161,7 @@ AT_CHECK([test ! -s pid])
 AT_CLEANUP
 
 AT_SETUP([daemon --service])
+AT_KEYWORDS([windows-service])
 AT_SKIP_IF([test "$IS_WIN32" != "yes"])
 OVSDB_INIT([db])
 AT_CAPTURE_FILE([pid])
@@ -173,7 +174,7 @@ AT_CHECK([sc create ovsdb-server 
binpath="$abs_path/ovsdb-server `pwd`/db --log-
 
 AT_CHECK([sc start ovsdb-server], [0], [ignore])
 OVS_WAIT_UNTIL([test -s pid])
-AT_CHECK([sc query ovsdb-server | grep STATE | grep RUNNING], [0], [ignore])
+OVS_WAIT_UNTIL([sc query ovsdb-server | grep STATE | grep RUNNING > /dev/null 
2>&1])
 AT_CHECK([kill -0 `cat pid`], [0], [ignore])
 AT_CHECK([ovs-appctl -t `pwd`/unixctl ovsdb-server/list-dbs], [0],
 [Open_vSwitch
-- 
1.7.9.5

_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to