diff options
| author | Wenzong Fan <wenzong.fan@windriver.com> | 2017-02-16 22:44:40 -0800 |
|---|---|---|
| committer | Armin Kuster <akuster808@gmail.com> | 2017-03-02 12:20:56 -0800 |
| commit | 8b38c93f2387793fb03d082e47723002cf667ae9 (patch) | |
| tree | e7955b55f517e8a5875d2294d1eaa8b7d60f1e5e | |
| parent | 21e1f1177c7293b7b2fe622dd499767e1a766b5b (diff) | |
| download | meta-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>
| -rw-r--r-- | recipes-security/libseccomp/files/run-ptest | 4 | ||||
| -rw-r--r-- | recipes-security/libseccomp/libseccomp.bb | 24 |
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 | |||
| 3 | cd 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 | ||
| 9 | PV = "2.3.1+git${SRCPV}" | 9 | PV = "2.3.1+git${SRCPV}" |
| 10 | 10 | ||
| 11 | SRC_URI = "git://github.com/seccomp/libseccomp.git;" | 11 | SRC_URI = "git://github.com/seccomp/libseccomp.git \ |
| 12 | file://run-ptest \ | ||
| 13 | " | ||
| 12 | 14 | ||
| 13 | S = "${WORKDIR}/git" | 15 | S = "${WORKDIR}/git" |
| 14 | 16 | ||
| 15 | inherit autotools-brokensep pkgconfig | 17 | inherit autotools-brokensep pkgconfig ptest |
| 16 | 18 | ||
| 17 | PACKAGECONFIG ??= "" | 19 | PACKAGECONFIG ??= "" |
| 18 | PACKAGECONFIG[python] = "--enable-python, --disable-python, python" | 20 | PACKAGECONFIG[python] = "--enable-python, --disable-python, python" |
| 19 | 21 | ||
| 20 | do_compile_append() { | 22 | do_compile_ptest() { |
| 21 | oe_runmake -C tests check-build | 23 | oe_runmake -C tests check-build |
| 22 | } | 24 | } |
| 23 | 25 | ||
| 24 | do_install_append() { | 26 | do_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 | ||
| 38 | PACKAGES += " ${PN}-tests" | ||
| 39 | FILES_${PN} = "${bindir} ${libdir}/${PN}.so*" | 40 | FILES_${PN} = "${bindir} ${libdir}/${PN}.so*" |
| 40 | FILES_${PN}-tests = "${libdir}/${PN}/tools ${libdir}/${PN}/tests" | ||
| 41 | FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug" | 41 | FILES_${PN}-dbg += "${libdir}/${PN}/tests/.debug/* ${libdir}/${PN}/tools/.debug" |
| 42 | 42 | ||
| 43 | RDEPENDS_${PN} = "bash" | 43 | RDEPENDS_${PN} = "bash" |
| 44 | RDEPENDS_${PN}-tests = "bash" | 44 | RDEPENDS_${PN}-ptest = "bash" |
