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 <nithin@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Nithin Raju <nithin@vmware.com>
Tested-by: Nithin Raju <nithin@vmware.com>
AT_CLEANUP
AT_SETUP([daemon --service])
+AT_KEYWORDS([windows-service])
AT_SKIP_IF([test "$IS_WIN32" != "yes"])
OVSDB_INIT([db])
AT_CAPTURE_FILE([pid])
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