tests: Remove the windows service in case it failed to start
authorAlin Serdean <aserdean@cloudbasesolutions.com>
Mon, 22 Jun 2015 22:45:18 +0000 (22:45 +0000)
committerGurucharan Shetty <gshetty@nicira.com>
Tue, 23 Jun 2015 14:40:27 +0000 (07:40 -0700)
In case the ovsdb-server failed to start, the defined service was not
properly cleaned.

Add a run-if-false command in case the service failed to start.

Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
tests/daemon.at

index dd7a3f4..51d56c5 100644 (file)
@@ -172,7 +172,7 @@ AT_CHECK([sc create ovsdb-server binpath="$abs_path/ovsdb-server `pwd`/db --log-
 [0], [[[SC]] CreateService SUCCESS
 ])
 
-AT_CHECK([sc start ovsdb-server], [0], [ignore])
+AT_CHECK([sc start ovsdb-server], [0], [ignore], [ignore], [sc delete ovsdb-server])
 OVS_WAIT_UNTIL([test -s pid])
 OVS_WAIT_UNTIL([sc query ovsdb-server | grep STATE | grep RUNNING > /dev/null 2>&1])
 AT_CHECK([kill -0 `cat pid`], [0], [ignore])