summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAlin Serdean <aserdean@cloudbasesolutions.com>2016-10-03 10:47:03 +0000
committerGurucharan Shetty <guru@ovn.org>2016-10-03 14:15:48 -0700
commit47d5c1e0524330b852a0abbf6a64142175fc3d3c (patch)
tree6a9fe9486bb9ab525baea70f57ab5a8142336754 /tests
parente2bfcad6cbb0e7f47e91f68b14307d213d11823a (diff)
downloadopenvswitch-47d5c1e0524330b852a0abbf6a64142175fc3d3c.tar.gz
ovsdb-monitor tests: Allow '--detach' argument to be used on Windows
This patch updates the ovsdb monitor tests to use it. The --detach argument is needed to make the unixctl for the ovsdb-client, to send commands. Fixes hanging test: monitor-cond-change Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> Signed-off-by: Gurucharan Shetty <guru@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovsdb-monitor.at20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at
index 6d51a1ae6..ff9d178ea 100644
--- a/tests/ovsdb-monitor.at
+++ b/tests/ovsdb-monitor.at
@@ -72,20 +72,20 @@ m4_define([OVSDB_CHECK_MONITOR_COND],
AT_CAPTURE_FILE([ovsdb-server-log])
AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/server-pid --remote=punix:socket --unixctl="`pwd`"/unixctl --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1],
[0], [], [])
- if test "$IS_WIN32" = "yes"; then
- AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid -d json monitor-cond --format=csv unix:socket $4 '[$8]' $5 $9 > output &],
- [0], [ignore], [ignore], [kill `cat server-pid`])
- sleep 1
- else
- AT_CHECK([ ovsdb-client -vjsonrpc --detach --no-chdir --pidfile="`pwd`"/client-pid -d json monitor-cond --format=csv unix:socket $4 '[$8]' $5 $9 > output],
+ AT_CHECK([ ovsdb-client -vjsonrpc --detach --no-chdir --pidfile="`pwd`"/client-pid -d json monitor-cond --format=csv unix:socket $4 '[$8]' $5 $9 > output],
[0], [ignore], [ignore], [kill `cat server-pid`])
- fi
m4_foreach([txn], [$6],
[AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0],
[ignore], [ignore], [kill `cat server-pid client-pid`])])
- CLIENT_PID=`cat "$OVS_RUNDIR"/client-pid 2>/dev/null`
- m4_foreach([cond], [$10],
- [AT_CHECK([ovs-appctl -t "`pwd`"/ovsdb-client.$CLIENT_PID.ctl ovsdb-client/cond_change $5 'cond'], [0], [ignore], [ignore])])
+ if test "$IS_WIN32" = "yes"; then
+ :
+ m4_foreach([cond], [$10],
+ [AT_CHECK([ovs-appctl -t "`pwd`"/ovsdb-client.ctl ovsdb-client/cond_change $5 'cond'], [0], [ignore], [ignore])])
+ else
+ CLIENT_PID=`cat "$OVS_RUNDIR"/client-pid 2>/dev/null`
+ m4_foreach([cond], [$10],
+ [AT_CHECK([ovs-appctl -t "`pwd`"/ovsdb-client.$CLIENT_PID.ctl ovsdb-client/cond_change $5 'cond'], [0], [ignore], [ignore])])
+ fi
AT_CHECK([ovsdb-client transact unix:socket '[["$4"]]'], [0],
[ignore], [ignore], [kill `cat server-pid client-pid`])
AT_CHECK([ovs-appctl -t "`pwd`"/unixctl -e exit], [0], [ignore], [ignore])