From 8b38c93f2387793fb03d082e47723002cf667ae9 Mon Sep 17 00:00:00 2001 From: Wenzong Fan Date: Thu, 16 Feb 2017 22:44:40 -0800 Subject: libseccomp: convert test package to ptest Signed-off-by: Wenzong Fan Signed-off-by: Armin Kuster --- 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 (limited to 'recipes-security') 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 aab411a..97283d4 100644 --- a/recipes-security/libseccomp/libseccomp.bb +++ b/recipes-security/libseccomp/libseccomp.bb @@ -8,37 +8,37 @@ SRCREV = "ce5aea6a4ae7523b57ec13e2e6150aa5d83c1b4e" 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" -- cgit v1.2.3-54-g00ecf