Message ID | d665a7a20c73c028b6b44bd895d0907ac53480cb.1523038098.git.tredaelli@redhat.com |
---|---|
State | Accepted |
Headers | show |
Series | [ovs-dev] json.at: Avoid to run $PYTHON when python is not available | expand |
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 <tredaelli@redhat.com> Thanks, applied to master. It sounds like this isn't a bug fix per se, so I didn't backport it.
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], [])
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 <tredaelli@redhat.com> --- tests/json.at | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)