diff mbox

[ovs-dev,V6,04/17] python tests: Fixed unixctl python tests for Windows

Message ID 1467808691-17280-5-git-send-email-pboca@cloudbasesolutions.com
State Superseded
Delegated to: Guru Shetty
Headers show

Commit Message

Paul Boca July 6, 2016, 12:38 p.m. UTC
For bogus pid file path, use a windows-like file path.

Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>
---
V2: No changes
V3: No changes
V4: No changes
V5: No changes
V6: No changes
---
 tests/unixctl-py.at | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

Comments

Alin Serdean July 6, 2016, 5:19 p.m. UTC | #1
Acked-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com>



> -----Mesaj original-----

> De la: dev [mailto:dev-bounces@openvswitch.org] În numele Paul Boca

> Trimis: Wednesday, July 6, 2016 3:38 PM

> Către: dev@openvswitch.org

> Subiect: [ovs-dev] [PATCH V6 04/17] python tests: Fixed unixctl python tests

> for Windows

> 

> For bogus pid file path, use a windows-like file path.

> 

> Signed-off-by: Paul-Daniel Boca <pboca@cloudbasesolutions.com>

> ---

> V2: No changes

> V3: No changes

> V4: No changes

> V5: No changes

> V6: No changes

> ---

>  tests/unixctl-py.at | 12 +++++++++---

>  1 file changed, 9 insertions(+), 3 deletions(-)

> 

> diff --git a/tests/unixctl-py.at b/tests/unixctl-py.at index cbcd802..2031897

> 100644

> --- a/tests/unixctl-py.at

> +++ b/tests/unixctl-py.at

> @@ -92,11 +92,17 @@ m4_define([UNIXCTL_BAD_TARGET_PYN],

>     AT_CHECK_UNQUOTED([tail -1 stderr], [0], [dnl

>  appctl.py: cannot read pidfile "`pwd`/bogus.pid" (No such file or directory)

>  ])

> -

> -   AT_CHECK([PYAPPCTL_PYN([$3]) -t /bogus/path.pid doit], [1], [], [stderr])

> -   AT_CHECK([tail -1 stderr], [0], [dnl

> +   if test "$IS_WIN32" = "no"; then

> +     AT_CHECK([PYAPPCTL_PYN([$3]) -t /bogus/path.pid doit], [1], [],

> [stderr])

> +     AT_CHECK([tail -1 stderr], [0], [dnl

>  appctl.py: cannot connect to "/bogus/path.pid" (No such file or directory)

>  ])

> +   else

> +     AT_CHECK([PYAPPCTL_PYN([$3]) -t c:/bogus/path.pid doit], [1], [],

> [stderr])

> +     AT_CHECK([tail -1 stderr], [0], [dnl

> +appctl.py: cannot connect to "c:/bogus/path.pid" (No such file or

> +directory)

> +])

> +   fi

> 

>     AT_CLEANUP])

> 

> --

> 2.7.2.windows.1

> _______________________________________________

> dev mailing list

> dev@openvswitch.org

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

Patch

diff --git a/tests/unixctl-py.at b/tests/unixctl-py.at
index cbcd802..2031897 100644
--- a/tests/unixctl-py.at
+++ b/tests/unixctl-py.at
@@ -92,11 +92,17 @@  m4_define([UNIXCTL_BAD_TARGET_PYN],
    AT_CHECK_UNQUOTED([tail -1 stderr], [0], [dnl
 appctl.py: cannot read pidfile "`pwd`/bogus.pid" (No such file or directory)
 ])
-
-   AT_CHECK([PYAPPCTL_PYN([$3]) -t /bogus/path.pid doit], [1], [], [stderr])
-   AT_CHECK([tail -1 stderr], [0], [dnl
+   if test "$IS_WIN32" = "no"; then
+     AT_CHECK([PYAPPCTL_PYN([$3]) -t /bogus/path.pid doit], [1], [], [stderr])
+     AT_CHECK([tail -1 stderr], [0], [dnl
 appctl.py: cannot connect to "/bogus/path.pid" (No such file or directory)
 ])
+   else
+     AT_CHECK([PYAPPCTL_PYN([$3]) -t c:/bogus/path.pid doit], [1], [], [stderr])
+     AT_CHECK([tail -1 stderr], [0], [dnl
+appctl.py: cannot connect to "c:/bogus/path.pid" (No such file or directory)
+])
+   fi
 
    AT_CLEANUP])