diff options
Diffstat (limited to 'meta-networking')
-rw-r--r-- | meta-networking/recipes-filter/nftables/nftables/run-ptest | 2 | ||||
-rw-r--r-- | meta-networking/recipes-filter/nftables/nftables_1.0.2.bb | 21 |
2 files changed, 22 insertions, 1 deletions
diff --git a/meta-networking/recipes-filter/nftables/nftables/run-ptest b/meta-networking/recipes-filter/nftables/nftables/run-ptest new file mode 100644 index 000000000..611b84485 --- /dev/null +++ b/meta-networking/recipes-filter/nftables/nftables/run-ptest | |||
@@ -0,0 +1,2 @@ | |||
1 | #!/bin/sh | ||
2 | tests/shell/run-tests.sh -v | ||
diff --git a/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb b/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb index fd8e26ed1..e078be79a 100644 --- a/meta-networking/recipes-filter/nftables/nftables_1.0.2.bb +++ b/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" | |||
11 | 11 | ||
12 | SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \ | 12 | SRC_URI = "http://www.netfilter.org/projects/nftables/files/${BP}.tar.bz2 \ |
13 | file://0001-examples-compile-with-make-check-and-add-AM_CPPFLAGS.patch \ | 13 | file://0001-examples-compile-with-make-check-and-add-AM_CPPFLAGS.patch \ |
14 | file://run-ptest \ | ||
14 | " | 15 | " |
15 | 16 | ||
16 | SRC_URI[sha256sum] = "0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02" | 17 | SRC_URI[sha256sum] = "0b28a36ffcf4567b841de7bd3f37918b1fed27859eb48bdec51e1f7a83954c02" |
17 | 18 | ||
18 | inherit autotools manpages pkgconfig | 19 | inherit autotools manpages pkgconfig ptest |
19 | 20 | ||
20 | PACKAGECONFIG ??= "python readline json" | 21 | PACKAGECONFIG ??= "python readline json" |
21 | PACKAGECONFIG[json] = "--with-json, --without-json, jansson" | 22 | PACKAGECONFIG[json] = "--with-json, --without-json, jansson" |
@@ -32,3 +33,21 @@ RRECOMMENDS:${PN} += "kernel-module-nf-tables" | |||
32 | PACKAGES =+ "${PN}-python" | 33 | PACKAGES =+ "${PN}-python" |
33 | FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" | 34 | FILES:${PN}-python = "${nonarch_libdir}/${PYTHON_DIR}" |
34 | RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" | 35 | RDEPENDS:${PN}-python = "python3-core python3-json ${PN}" |
36 | |||
37 | RDEPENDS:${PN}-ptest += " make bash python3-core python3-ctypes python3-json python3-misc util-linux" | ||
38 | |||
39 | TESTDIR = "tests" | ||
40 | |||
41 | PRIVATE_LIBS:${PN}-ptest:append = "libnftables.so.1" | ||
42 | |||
43 | do_install_ptest() { | ||
44 | cp -rf ${S}/build-aux ${D}${PTEST_PATH} | ||
45 | cp -rf ${S}/src ${D}${PTEST_PATH} | ||
46 | mkdir -p ${D}${PTEST_PATH}/src/.libs | ||
47 | cp -rf ${B}/src/.libs/* ${D}${PTEST_PATH}/src/.libs | ||
48 | cp -rf ${B}/src/.libs/nft ${D}${PTEST_PATH}/src/ | ||
49 | cp -rf ${S}/py ${D}${PTEST_PATH} | ||
50 | cp -rf ${S}/${TESTDIR} ${D}${PTEST_PATH}/${TESTDIR} | ||
51 | sed -i 's#/usr/bin/python#/usr/bin/python3#' ${D}${PTEST_PATH}/${TESTDIR}/json_echo/run-test.py | ||
52 | sed -i 's#/usr/bin/env python#/usr/bin/env python3#' ${D}${PTEST_PATH}/${TESTDIR}/py/nft-test.py | ||
53 | } | ||