diff options
3 files changed, 63 insertions, 1 deletions
diff --git a/meta-networking/recipes-filter/libnftnl/libnftnl/0001-configure.ac-Add-serial-tests.patch b/meta-networking/recipes-filter/libnftnl/libnftnl/0001-configure.ac-Add-serial-tests.patch new file mode 100644 index 0000000000..049ad2d39a --- /dev/null +++ b/meta-networking/recipes-filter/libnftnl/libnftnl/0001-configure.ac-Add-serial-tests.patch | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | From 1cb59c1fed33607e4fb2bee9144ce45276e9cc96 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
| 3 | Date: Tue, 14 Dec 2021 12:31:12 -0500 | ||
| 4 | Subject: [PATCH] configure.ac: Add serial-tests | ||
| 5 | |||
| 6 | ptest needs buildtest-TESTS and runtest-TESTS targets. | ||
| 7 | serial-tests is required to generate those targets. | ||
| 8 | |||
| 9 | Upstream-Status: Inappropriate (default automake behavior incompatible with ptest) | ||
| 10 | |||
| 11 | Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> | ||
| 12 | --- | ||
| 13 | configure.ac | 4 +++- | ||
| 14 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
| 15 | |||
| 16 | diff --git a/configure.ac b/configure.ac | ||
| 17 | index 8e68035..2704214 100644 | ||
| 18 | --- a/configure.ac | ||
| 19 | +++ b/configure.ac | ||
| 20 | @@ -8,7 +8,9 @@ AC_CONFIG_HEADERS([config.h]) | ||
| 21 | m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) | ||
| 22 | |||
| 23 | AM_INIT_AUTOMAKE([-Wall foreign tar-pax no-dist-gzip dist-bzip2 | ||
| 24 | - 1.6 subdir-objects]) | ||
| 25 | + 1.6 subdir-objects serial-tests]) | ||
| 26 | + | ||
| 27 | +AM_EXTRA_RECURSIVE_TARGETS([buildtest-TESTS]) | ||
| 28 | |||
| 29 | dnl kernel style compile messages | ||
| 30 | m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) | ||
| 31 | -- | ||
| 32 | 2.33.1 | ||
| 33 | |||
diff --git a/meta-networking/recipes-filter/libnftnl/libnftnl/run-ptest b/meta-networking/recipes-filter/libnftnl/libnftnl/run-ptest new file mode 100644 index 0000000000..133cf92d02 --- /dev/null +++ b/meta-networking/recipes-filter/libnftnl/libnftnl/run-ptest | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | make -C tests -k runtest-TESTS | ||
diff --git a/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.1.bb b/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.1.bb index 16de8589a7..ec4619e7b9 100644 --- a/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.1.bb +++ b/meta-networking/recipes-filter/libnftnl/libnftnl_1.2.1.bb | |||
| @@ -7,8 +7,35 @@ DEPENDS = "libmnl" | |||
| 7 | SRCREV = "09456c720e9c00eecc08e41ac6b7c291b3821ee5" | 7 | SRCREV = "09456c720e9c00eecc08e41ac6b7c291b3821ee5" |
| 8 | SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \ | 8 | SRC_URI = "git://git.netfilter.org/libnftnl;branch=master \ |
| 9 | file://0001-avoid-naming-local-function-as-one-of-printf-family.patch \ | 9 | file://0001-avoid-naming-local-function-as-one-of-printf-family.patch \ |
| 10 | file://0001-configure.ac-Add-serial-tests.patch \ | ||
| 11 | file://run-ptest \ | ||
| 10 | " | 12 | " |
| 11 | 13 | ||
| 12 | S = "${WORKDIR}/git" | 14 | S = "${WORKDIR}/git" |
| 13 | 15 | ||
| 14 | inherit autotools pkgconfig | 16 | inherit autotools pkgconfig ptest |
| 17 | |||
| 18 | RDEPENDS:${PN}-ptest += " bash python3-core make" | ||
| 19 | |||
| 20 | TESTDIR = "tests" | ||
| 21 | |||
| 22 | do_compile_ptest() { | ||
| 23 | cp -rf ${S}/build-aux . | ||
| 24 | oe_runmake buildtest-TESTS | ||
| 25 | } | ||
| 26 | |||
| 27 | do_install_ptest() { | ||
| 28 | cp -rf ${B}/build-aux ${D}${PTEST_PATH} | ||
| 29 | install -d ${D}${PTEST_PATH}/${TESTDIR} | ||
| 30 | cp -rf ${B}/${TESTDIR}/Makefile ${D}${PTEST_PATH}/${TESTDIR} | ||
| 31 | |||
| 32 | # the binaries compiled in ${TESTDIR} will look for a compiler to | ||
| 33 | # use, which will cause failures. Substitute the binaries in | ||
| 34 | # ${TESTDIR}/.libs instead | ||
| 35 | cp -rf ${B}/${TESTDIR}/.libs/* ${D}${PTEST_PATH}/${TESTDIR} | ||
| 36 | |||
| 37 | # Alter the Makefile so that it does not try and rebuild anything in | ||
| 38 | # other nonexistent paths before running the actual tests | ||
| 39 | sed -i 's/^Makefile/_Makefile/' ${D}${PTEST_PATH}/${TESTDIR}/Makefile | ||
| 40 | } | ||
| 41 | |||
