Re: [ovs-dev] [PATCH] json.at: Avoid to run $PYTHON when python is not available

2018-04-06 Thread Ben Pfaff
On Fri, Apr 06, 2018 at 08:08:24PM +0200, Timothy Redaelli wrote:
> This commit is needed since autotest tries to run AT_XFAIL_IF when
> AT_SKIP_IF condition is true too.
> 
> Currently HAVE_PYTHON is required, but this may change in the future
> since many distributions are migrating to python3 as default python
> (like Arch Linux or Fedora) and so it can be a good idea to permit to
> build OVS using python3.
> 
> Signed-off-by: Timothy Redaelli 

Thanks, applied to master.  It sounds like this isn't a bug fix per se,
so I didn't backport it.
___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev


[ovs-dev] [PATCH] json.at: Avoid to run $PYTHON when python is not available

2018-04-06 Thread Timothy Redaelli
This commit is needed since autotest tries to run AT_XFAIL_IF when
AT_SKIP_IF condition is true too.

Currently HAVE_PYTHON is required, but this may change in the future
since many distributions are migrating to python3 as default python
(like Arch Linux or Fedora) and so it can be a good idea to permit to
build OVS using python3.

Signed-off-by: Timothy Redaelli 
---
 tests/json.at | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/json.at b/tests/json.at
index ba7d4bbbe..325ac9435 100644
--- a/tests/json.at
+++ b/tests/json.at
@@ -26,7 +26,8 @@ m4_define([JSON_CHECK_POSITIVE_UCS4PY],
   [AT_SETUP([$1])
AT_KEYWORDS([json positive Python])
AT_SKIP_IF([test $HAVE_PYTHON = no])
-   AT_XFAIL_IF([$PYTHON -c "exit(len(u'\U00010800'))"; test $? -ne 1])
+   AT_XFAIL_IF([test $HAVE_PYTHON = yes &&
+$PYTHON -c "exit(len(u'\U00010800'))"; test $? -ne 1])
AT_CHECK([printf %s "AS_ESCAPE([$2])" > input])
AT_CAPTURE_FILE([input])
AT_CHECK([$PYTHON $srcdir/test-json.py $4 input], [0], [stdout], [])
-- 
2.14.3

___
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev