mirror of
https://github.com/openvswitch/ovs
synced 2025-09-05 16:55:42 +00:00
Test the Python C JSON extension
The C JSON parser was added quite a while ago, but unless you configure with --enable-shared and have the Python 2/3 development libraries installed, and the resulting python-ovs module installed, 'make check' won't actually test it. This patch changes Python-based tests to run from the $builddir/python directory and makes the tests configurable to use both JSON backends. There are some unicode failures in the C JSON extension that I left unfixed in this patch to make it easy to show run the new tests on broken code. The next patch in this set works around the issue. Signed-off-by: Terry Wilson <twilson@redhat.com> Signed-off-by: Ben Pfaff <blp@ovn.org> Acked-by: Lucas Alvares Gomes <lucasagomes@gmail.com>
This commit is contained in:
@@ -92,6 +92,17 @@ python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py
|
||||
|
||||
pypi-upload: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py
|
||||
(cd python/ && $(PYTHON) setup.py sdist upload)
|
||||
|
||||
ALL_LOCAL += python-build
|
||||
python-build:$(lib_LTLIBRARIES)
|
||||
(cd $(srcdir)/python/ && $(PYTHON) setup.py build_py -d $(abs_top_builddir)/python && $(PYTHON) setup.py build_ext -b $(abs_top_builddir)/python -I$(abs_top_srcdir)/include:$(abs_top_builddir)/include -L$(abs_top_builddir)/lib/.libs)
|
||||
if HAVE_PYTHON3
|
||||
(cd $(srcdir)/python/ && $(PYTHON3) setup.py build_py -d $(abs_top_builddir)/python && $(PYTHON3) setup.py build_ext -b $(abs_top_builddir)/python -I$(abs_top_srcdir)/include:$(abs_top_builddir)/include -L$(abs_top_builddir)/lib/.libs)
|
||||
|
||||
CLEAN_LOCAL += python-clean
|
||||
python-clean:
|
||||
rm -rf $(abs_top_builddir)/python
|
||||
endif
|
||||
else
|
||||
ovs-install-data-local:
|
||||
@:
|
||||
|
Reference in New Issue
Block a user