diff options
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-filter/nftables')
-rw-r--r-- | meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest | 2 | ||||
-rw-r--r-- | meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest b/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest new file mode 100644 index 0000000000..611b844853 --- /dev/null +++ b/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest @@ -0,0 +1,2 @@ +#!/bin/sh +tests/shell/run-tests.sh -v diff --git a/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb b/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb index fd8e26ed1a..e078be79a1 100644 --- a/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb +++ b/meta-openembedded/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb @@ -11,11 +11,12 @@ UPSTREAM_CHECK_REGEX = "nftables-(?P<pver>\d+(\.\d+){2,}).tar.bz2" SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \ file://0001-examples-compile-with-make-check-and-add-AM_CPPFLAGS.patch \ + file://run-ptest \ " SRC_URI[sha256sum] = "0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02" -inherit autotools manpages pkgconfig +inherit autotools manpages pkgconfig ptest PACKAGECONFIG ??= "python readline json" PACKAGECONFIG[json] = "--with-json, --without-json, jansson" @@ -32,3 +33,21 @@ RRECOMMENDS:${PN} += "kernel-module-nf-tables" PACKAGES =+ "${PN}-python" FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" + +RDEPENDS:${PN}-ptest += " make bash python3-core python3-ctypes python3-json python3-misc util-linux" + +TESTDIR = "tests" + +PRIVATE_LIBS:${PN}-ptest:append = "libnftables.so.1" + +do_install_ptest() { + cp -rf ${S}/build-aux ${D}${PTEST_PATH} + cp -rf ${S}/src ${D}${PTEST_PATH} + mkdir -p ${D}${PTEST_PATH}/src/.libs + cp -rf ${B}/src/.libs/* ${D}${PTEST_PATH}/src/.libs + cp -rf ${B}/src/.libs/nft ${D}${PTEST_PATH}/src/ + cp -rf ${S}/py ${D}${PTEST_PATH} + cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}/${TESTDIR} + sed -i 's#/usr/bin/python#/usr/bin/python3#' ${D}${PTEST_PATH}/${TESTDIR}/json_echo/run-test.py + sed -i 's#/usr/bin/env python#/usr/bin/env python3#' ${D}${PTEST_PATH}/${TESTDIR}/py/nft-test.py +} |