diff mbox

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

Message ID 1464960881-16108-1-git-send-email-pboca@cloudbasesolutions.com
State Rejected
Headers show

Commit Message

Paul Boca June 3, 2016, 1:34 p.m. UTC
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@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(-)

Comments

Paul Boca June 3, 2016, 1:36 p.m. UTC | #1
This should be V3 version. Disregard this one, I will send another one with the right version.

> -----Original Message-----

> From: dev [mailto:dev-bounces@openvswitch.org] On Behalf Of Paul Boca

> Sent: Friday, June 3, 2016 4:35 PM

> To: dev@openvswitch.org

> Subject: [ovs-dev] [PATCH V2 3/4] tests: Modified

> OVS_APP_EXIT_AND_WAIT_BY_TARGET to work on windows too

> 

> 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@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

> _______________________________________________

> dev mailing list

> dev@openvswitch.org

> http://openvswitch.org/mailman/listinfo/dev
diff mbox

Patch

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"