summaryrefslogtreecommitdiffstats
path: root/recipes-security
diff options
context:
space:
mode:
authorWenzong Fan <wenzong.fan@windriver.com>2017-02-16 22:44:40 -0800
committerArmin Kuster <akuster808@gmail.com>2017-03-02 12:20:56 -0800
commit8b38c93f2387793fb03d082e47723002cf667ae9 (patch)
treee7955b55f517e8a5875d2294d1eaa8b7d60f1e5e /recipes-security
parent21e1f1177c7293b7b2fe622dd499767e1a766b5b (diff)
downloadmeta-security-8b38c93f2387793fb03d082e47723002cf667ae9.tar.gz
libseccomp: convert test package to ptest
Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com> Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'recipes-security')
-rw-r--r--recipes-security/libseccomp/files/run-ptest4
-rw-r--r--recipes-security/libseccomp/libseccomp.bb24
2 files changed, 16 insertions, 12 deletions
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 @@
1#!/bin/sh
2
3cd tests
4./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"
8 8
9PV = "2.3.1+git${SRCPV}" 9PV = "2.3.1+git${SRCPV}"
10 10
11SRC_URI = "git://github.com/seccomp/libseccomp.git;" 11SRC_URI = "git://github.com/seccomp/libseccomp.git \
12 file://run-ptest \
13"
12 14
13S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
14 16
15inherit autotools-brokensep pkgconfig 17inherit autotools-brokensep pkgconfig ptest
16 18
17PACKAGECONFIG ??= "" 19PACKAGECONFIG ??= ""
18PACKAGECONFIG[python] = "--enable-python, --disable-python, python" 20PACKAGECONFIG[python] = "--enable-python, --disable-python, python"
19 21
20do_compile_append() { 22do_compile_ptest() {
21 oe_runmake -C tests check-build 23 oe_runmake -C tests check-build
22} 24}
23 25
24do_install_append() { 26do_install_ptest() {
25 install -d ${D}/${libdir}/${PN}/tests 27 install -d ${D}${PTEST_PATH}/tests
26 install -d ${D}/${libdir}/${PN}/tools 28 install -d ${D}${PTEST_PATH}/tools
27 for file in $(find tests/* -executable -type f); do 29 for file in $(find tests/* -executable -type f); do
28 install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests 30 install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests
29 done 31 done
30 for file in $(find tests/*.tests -type f); do 32 for file in $(find tests/*.tests -type f); do
31 install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tests 33 install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tests
32 done 34 done
33 for file in $(find tools/* -executable -type f); do 35 for file in $(find tools/* -executable -type f); do
34 install -m 744 ${S}/${file} ${D}/${libdir}/${PN}/tools 36 install -m 744 ${S}/${file} ${D}/${PTEST_PATH}/tools
35 done 37 done
36} 38}
37 39
38PACKAGES += " ${PN}-tests"
39FILES_${PN} = "${bindir} ${libdir}/${PN}.so*" 40FILES_${PN} = "${bindir} ${libdir}/${PN}.so*"
40FILES_${PN}-tests = "${libdir}/${PN}/tools ${libdir}/${PN}/tests"
41FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug" 41FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug"
42 42
43RDEPENDS_${PN} = "bash" 43RDEPENDS_${PN} = "bash"
44RDEPENDS_${PN}-tests = "bash" 44RDEPENDS_${PN}-ptest = "bash"