Skip to content

Commit

Permalink
json.at: Avoid to run $PYTHON when python is not available
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Ben Pfaff <[email protected]>
  • Loading branch information
drizzt authored and blp committed Apr 6, 2018
1 parent 098ab9f commit a045e4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/json.at
Original file line number Diff line number Diff line change
Expand Up @@ -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], [])
Expand Down

0 comments on commit a045e4b

Please sign in to comment.