fail2ban: add ptest

Signed-off-by: Armin Kuster <akuster808@gmail.com>
This commit is contained in:
Armin Kuster
2018-10-28 01:07:32 +01:00
parent af173c0440
commit d32ae3cb83
4 changed files with 15 additions and 1 deletions
@@ -0,0 +1,3 @@
#!/bin/sh
##PYTHON## fail2ban-testcases
@@ -14,9 +14,10 @@ SRC_URI = " \
git://github.com/fail2ban/fail2ban.git;branch=0.11 \ git://github.com/fail2ban/fail2ban.git;branch=0.11 \
file://initd \ file://initd \
file://fail2ban_setup.py \ file://fail2ban_setup.py \
file://run-ptest \
" "
inherit update-rc.d inherit update-rc.d ptest
S = "${WORKDIR}/git" S = "${WORKDIR}/git"
@@ -35,6 +36,12 @@ do_install_append () {
chown -R root:root ${D}/${bindir} chown -R root:root ${D}/${bindir}
} }
do_install_ptest_append () {
install -d ${D}${PTEST_PATH}
sed -i -e 's/##PYTHON##/${PYTHON_PN}/g' ${D}${PTEST_PATH}/run-ptest
install -D ${S}/bin/fail2ban-testcases ${D}${PTEST_PATH}
}
FILES_${PN} += "/run" FILES_${PN} += "/run"
INSANE_SKIP_${PN}_append = "already-stripped" INSANE_SKIP_${PN}_append = "already-stripped"
@@ -1,2 +1,4 @@
inherit setuptools inherit setuptools
require python-fail2ban.inc require python-fail2ban.inc
RDEPENDS_${PN}-ptest = "python python-modules python-fail2ban"
@@ -1,2 +1,4 @@
inherit setuptools3 inherit setuptools3
require python-fail2ban.inc require python-fail2ban.inc
RDEPENDS_${PN}-ptest = "python3-core python3-io python3-modules python3-fail2ban"