summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJussi Kukkonen <jussi.kukkonen@intel.com>2016-03-16 14:13:45 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-03-20 23:12:27 +0000
commit8c0148f7b9d8532bbefbef7cc0495f879f4d12c4 (patch)
tree8f63e9cac37a7ee887157c818e8012bd659aa53d /meta
parent427e3694098210dcb7208fff714e35040add3983 (diff)
downloadpoky-8c0148f7b9d8532bbefbef7cc0495f879f4d12c4.tar.gz
systemd: Fix and expand ptests
systemd-ptest only runs a couple of tests currently. * Install all test binaries and required data files * Add missing runtime dependencies for -ptest * Fix paths required for on-target testing in do_configure_prepend() * cleanup do_install_ptest() For reference, results on current core-image-sato: PASS: 109 SKIP: 5 FAIL: 2 test-execute failure: https://github.com/systemd/systemd/issues/2852 test-acl-util failure: https://bugzilla.yoctoproject.org/show_bug.cgi?id=9269 Fixes [YOCTO #8767]. (From OE-Core rev: 753daf14da4017cd5d245f1587ca44faa39784f5) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/systemd/systemd/run-ptest5
-rw-r--r--meta/recipes-core/systemd/systemd_229.bb39
2 files changed, 30 insertions, 14 deletions
diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
index a2d61c2894..2ae76ffaf1 100644
--- a/meta/recipes-core/systemd/systemd/run-ptest
+++ b/meta/recipes-core/systemd/systemd/run-ptest
@@ -1,5 +1,6 @@
1#!/bin/sh 1#!/bin/sh
2 2
3cd tests
3tar -C test -xJf test/sys.tar.xz 4tar -C test -xJf test/sys.tar.xz
4make test/rules-test.sh.log 5make check-TESTS
5make test/udev-test.pl.log 6cd ..
diff --git a/meta/recipes-core/systemd/systemd_229.bb b/meta/recipes-core/systemd/systemd_229.bb
index ae88c89673..b16cacb10f 100644
--- a/meta/recipes-core/systemd/systemd_229.bb
+++ b/meta/recipes-core/systemd/systemd_229.bb
@@ -197,6 +197,8 @@ do_configure_prepend() {
197 else 197 else
198 cp -r ${S}/units ${S}/units.pre_sed 198 cp -r ${S}/units ${S}/units.pre_sed
199 fi 199 fi
200 sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
201 sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
200} 202}
201 203
202do_install() { 204do_install() {
@@ -264,19 +266,27 @@ do_install() {
264} 266}
265 267
266do_install_ptest () { 268do_install_ptest () {
267 install -d ${D}${PTEST_PATH}/test 269 # install data files needed for tests
268 cp -rfL ${S}/test/* ${D}${PTEST_PATH}/test 270 install -d ${D}${PTEST_PATH}/tests/test
269 install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/ 271 cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
270 install -d ${D}${PTEST_PATH}/build-aux 272 sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
271 cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ 273
272 cp -rf ${B}/rules ${D}${PTEST_PATH}/ 274 install -d ${D}${PTEST_PATH}/tests/catalog
275 install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
276
277 install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
278
279 install -d ${D}${PTEST_PATH}/tests/rules
280 install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
281
273 # This directory needs to be there for udev-test.pl to work. 282 # This directory needs to be there for udev-test.pl to work.
274 install -d ${D}${libdir}/udev/rules.d 283 install -d ${D}${libdir}/udev/rules.d
275 cp ${B}/Makefile ${D}${PTEST_PATH}/ 284
276 cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test 285 # install actual test binaries
277 sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl 286 install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
278 sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile 287 install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
279 sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile 288
289 install ${B}/Makefile ${D}${PTEST_PATH}/tests/
280} 290}
281 291
282python populate_packages_prepend (){ 292python populate_packages_prepend (){
@@ -312,7 +322,12 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
312FILES_${PN}-initramfs = "/init" 322FILES_${PN}-initramfs = "/init"
313RDEPENDS_${PN}-initramfs = "${PN}" 323RDEPENDS_${PN}-initramfs = "${PN}"
314 324
315RDEPENDS_${PN}-ptest += "perl python bash" 325RDEPENDS_${PN}-ptest += "gawk make perl python bash xz \
326 tzdata tzdata-americas tzdata-asia \
327 tzdata-europe tzdata-africa tzdata-antarctica \
328 tzdata-arctic tzdata-atlantic tzdata-australia \
329 tzdata-pacific tzdata-posix"
330
316FILES_${PN}-ptest += "${libdir}/udev/rules.d" 331FILES_${PN}-ptest += "${libdir}/udev/rules.d"
317 332
318FILES_${PN}-gui = "${bindir}/systemadm" 333FILES_${PN}-gui = "${bindir}/systemadm"