[yocto] [meta-security][PATCH] libseccomp: convert test package to ptest
wenzong.fan at windriver.com
wenzong.fan at windriver.com
Thu Feb 16 22:44:40 PST 2017
From: Wenzong Fan <wenzong.fan at windriver.com>
Signed-off-by: Wenzong Fan <wenzong.fan at windriver.com>
---
recipes-security/libseccomp/files/run-ptest | 4 ++++
recipes-security/libseccomp/libseccomp.bb | 24 ++++++++++++------------
2 files changed, 16 insertions(+), 12 deletions(-)
create mode 100644 recipes-security/libseccomp/files/run-ptest
diff --git a/recipes-security/libseccomp/files/run-ptest b/recipes-security/libseccomp/files/run-ptest
new file mode 100644
index 0000000..54b4a63
--- /dev/null
+++ b/recipes-security/libseccomp/files/run-ptest
@@ -0,0 +1,4 @@
+#!/bin/sh
+
+cd tests
+./regression -a
diff --git a/recipes-security/libseccomp/libseccomp.bb b/recipes-security/libseccomp/libseccomp.bb
index c131bea..830e051 100644
--- a/recipes-security/libseccomp/libseccomp.bb
+++ b/recipes-security/libseccomp/libseccomp.bb
@@ -8,37 +8,37 @@ SRCREV = "937e774d8ccfd063a601f49ef46769de3926b62d"
PV = "2.3.1+git${SRCPV}"
-SRC_URI = "git://github.com/seccomp/libseccomp.git"
+SRC_URI = "git://github.com/seccomp/libseccomp.git \
+ file://run-ptest \
+"
S = "${WORKDIR}/git"
-inherit autotools-brokensep pkgconfig
+inherit autotools-brokensep pkgconfig ptest
PACKAGECONFIG ??= ""
PACKAGECONFIG[python] = "--enable-python, --disable-python, python"
-do_compile_append() {
+do_compile_ptest() {
oe_runmake -C tests check-build
}
-do_install_append() {
- install -d ${D}/${libdir}/${PN}/tests
- install -d ${D}/${libdir}/${PN}/tools
+do_install_ptest() {
+ install -d ${D}${PTEST_PATH}/tests
+ install -d ${D}${PTEST_PATH}/tools
for file in $(find tests/* -executable -type f); do
- install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests
+ install -m 744 ${S}/${file} ${D}${PTEST_PATH}/tests
done
for file in $(find tests/*.tests -type f); do
- install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests
+ install -m 744 ${S}/${file} ${D}${PTEST_PATH}/tests
done
for file in $(find tools/* -executable -type f); do
- install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tools
+ install -m 744 ${S}/${file} ${D}${PTEST_PATH}/tools
done
}
-PACKAGES += " ${PN}-tests"
FILES_${PN} = "${bindir} ${libdir}/${PN}.so*"
-FILES_${PN}-tests = "${libdir}/${PN}/tools ${libdir}/${PN}/tests"
FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug"
RDEPENDS_${PN} = "bash"
-RDEPENDS_${PN}-tests = "bash"
+RDEPENDS_${PN}-ptest = "bash"
--
2.7.4
More information about the yocto
mailing list