[ovs-dev] [PATCH 05/14] json.at: Run for Python 2 and 3.
Ben Pfaff
blp at ovn.org
Mon Feb 22 16:35:50 UTC 2016
On Tue, Feb 02, 2016 at 05:36:47PM -0500, Russell Bryant wrote:
> Run json.at tests for both Python 2 and 3 if available.
>
> Signed-off-by: Russell Bryant <russell at ovn.org>
The new comment here is nice:
> +# JSON_CHECK_POSITIVE_PY(TITLE, INPUT, OUTPUT, TEST-JSON-ARGS,
> +# PYTHON-CHCEK, PYTHON-BIN)
> +#
...and so it would be nice to have a similar new comment here:
> m4_define([JSON_CHECK_NEGATIVE_PY],
> [AT_SETUP([$1])
> AT_KEYWORDS([json negative Python])
> - AT_SKIP_IF([test $HAVE_PYTHON = no])
> + AT_SKIP_IF([test $5 = no])
> AT_CHECK([printf %s "AS_ESCAPE([$2])" > input])
> AT_CAPTURE_FILE([input])
> - AT_CHECK([$PYTHON $srcdir/test-json.py $4 input], [1], [stdout], [])
> + AT_CHECK([$6 $srcdir/test-json.py $4 input], [1], [stdout], [])
> AT_CHECK([[sed 's/^error: [^:]*:/error:/' < stdout]], [0], [$3
> ])
> AT_CLEANUP])
Acked-by: Ben Pfaff <blp at ovn.org>
More information about the dev
mailing list