[ovs-dev] [PATCH V3 3/4] tests: Modified OVS_APP_EXIT_AND_WAIT_BY_TARGET to work on windows too

Paul Boca pboca at cloudbasesolutions.com
Fri Jun 3 13:38:06 UTC 2016


On Windows the CTL file doesn't contain the PID in it's name.
Also this macro is used for other apps beside ovsdb-server.

Signed-off-by: Paul-Daniel Boca <pboca at cloudbasesolutions.com>
---
V2: Changed this macro to accept any target besides ovsdb-server
---
 tests/ovs-macros.at | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/ovs-macros.at b/tests/ovs-macros.at
index e5710a0..1a44b17 100644
--- a/tests/ovs-macros.at
+++ b/tests/ovs-macros.at
@@ -145,7 +145,11 @@ dnl Ask the daemon named DAEMON to exit, via ovs-appctl (using the target
 dnl argument), and then waits for it to exit.
 m4_define([OVS_APP_EXIT_AND_WAIT_BY_TARGET],
   [TMPPID=`cat "$OVS_RUNDIR"/$1.pid 2>/dev/null`
-   AT_CHECK([ovs-appctl --target=$OVS_RUNDIR/ovsdb-server.$TMPPID.ctl exit])
+   if test "$IS_WIN32" = "yes"; then
+    AT_CHECK([ovs-appctl --target=$OVS_RUNDIR/$1.ctl exit])
+   else
+     AT_CHECK([ovs-appctl --target=$OVS_RUNDIR/$1.$TMPPID.ctl exit])
+   fi
    OVS_WAIT_WHILE([kill -0 $TMPPID 2>/dev/null])])
 
 dnl on_exit "COMMAND"
-- 
2.7.2.windows.1



More information about the dev mailing list