ifupdown: add ptest
PATCH 1/1 ifupdown: add ptest
From: Kai Kang <[email protected]>
Add ptest for ifupdown with its own test cases.
[Yocto #13736]
Signed-off-by Kai Kang <[email protected]>
--- meta/recipes-core/ifupdown/files/run-ptest | 4 ++ .../ifupdown/files/tweak-ptest-script.patch | 49 +++++++++++++++++++ meta/recipes-core/ifupdown/ifupdown_0.8.35.bb | 10 +++- 3 files changed, 62 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/ifupdown/files/run-ptest create mode 100644 meta/recipes-core/ifupdown/files/tweak-ptest-script.patch
meta/recipes-core/ifupdown/files/run-ptest new file +4 -0
@@ -0,0 +1,4 @@ +#!/bin/sh + +CURDIR=$(dirname `readlink -f $0`) +cd $CURDIR/tests && ./testbuild-linux
meta/recipes-core/ifupdown/files/tweak-ptest-script.patch new file +49 -0
49 lines not on this page · raw message
meta/recipes-core/ifupdown/ifupdown_0.8.35.bb +9 -1
@@ -11,13 +11,15 @@ SRC_URI = "git://salsa.debian.org/debian/ifupdown.git;protocol=https \ file://99_network \ file://0001-Define-FNM_EXTMATCH-for-musl.patch \ file://0001-Makefile-do-not-use-dpkg-for-determining-OS-type.patch \ + file://run-ptest \ + ${@bb.utils.contains('DISTRO_FEATURES', 'ptest', 'file://tweak-ptest-script.patch', '', d)} \ " SRCREV = "4af76318cfc57f8e4a44d357104188666213bd4b" S = "${WORKDIR}/git" -inherit update-alternatives +inherit ptest update-alternatives do_compile () { chmod a+rx *.pl *.sh
@@ -40,6 +42,12 @@ do_install () { cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8 } +do_install_ptest () { + install -d ${D}${PTEST_PATH}/tests + cp -r ${S}/tests/testbuild-linux ${D}${PTEST_PATH}/tests/ + cp -r ${S}/tests/linux ${D}${PTEST_PATH}/tests/ +} + ALTERNATIVE_PRIORITY = "100" ALTERNATIVE_${PN} = "ifup ifdown"
Signature · 1 line
2.17.1