aboutsummaryrefslogtreecommitdiffstats
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 22:57:55 +0000
commit753daf14da4017cd5d245f1587ca44faa39784f5 (patch)
tree74186e23eda34bdf4fc63b5a2093950df0617a0e /meta
parent14640f16b5ce09a14f88b3fa641d4cf2780f8b97 (diff)
downloadopenembedded-core-contrib-753daf14da4017cd5d245f1587ca44faa39784f5.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]. Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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 @@
#!/bin/sh
+cd tests
tar -C test -xJf test/sys.tar.xz
-make test/rules-test.sh.log
-make test/udev-test.pl.log
+make check-TESTS
+cd ..
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() {
else
cp -r ${S}/units ${S}/units.pre_sed
fi
+ sed -i -e 's:-DTEST_DIR=\\\".*\\\":-DTEST_DIR=\\\"${PTEST_PATH}/tests/test\\\":' ${S}/Makefile.am
+ sed -i -e 's:-DCATALOG_DIR=\\\".*\\\":-DCATALOG_DIR=\\\"${PTEST_PATH}/tests/catalog\\\":' ${S}/Makefile.am
}
do_install() {
@@ -264,19 +266,27 @@ do_install() {
}
do_install_ptest () {
- install -d ${D}${PTEST_PATH}/test
- cp -rfL ${S}/test/* ${D}${PTEST_PATH}/test
- install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
- install -d ${D}${PTEST_PATH}/build-aux
- cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
- cp -rf ${B}/rules ${D}${PTEST_PATH}/
+ # install data files needed for tests
+ install -d ${D}${PTEST_PATH}/tests/test
+ cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
+ sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
+
+ install -d ${D}${PTEST_PATH}/tests/catalog
+ install ${S}/catalog/* ${D}${PTEST_PATH}/tests/catalog/
+
+ install -D ${S}/build-aux/test-driver ${D}${PTEST_PATH}/tests/build-aux/test-driver
+
+ install -d ${D}${PTEST_PATH}/tests/rules
+ install ${B}/rules/* ${D}${PTEST_PATH}/tests/rules/
+
# This directory needs to be there for udev-test.pl to work.
install -d ${D}${libdir}/udev/rules.d
- cp ${B}/Makefile ${D}${PTEST_PATH}/
- cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
- sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
- sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
- sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
+
+ # install actual test binaries
+ install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
+ install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
+
+ install ${B}/Makefile ${D}${PTEST_PATH}/tests/
}
python populate_packages_prepend (){
@@ -312,7 +322,12 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
FILES_${PN}-initramfs = "/init"
RDEPENDS_${PN}-initramfs = "${PN}"
-RDEPENDS_${PN}-ptest += "perl python bash"
+RDEPENDS_${PN}-ptest += "gawk make perl python bash xz \
+ tzdata tzdata-americas tzdata-asia \
+ tzdata-europe tzdata-africa tzdata-antarctica \
+ tzdata-arctic tzdata-atlantic tzdata-australia \
+ tzdata-pacific tzdata-posix"
+
FILES_${PN}-ptest += "${libdir}/udev/rules.d"
FILES_${PN}-gui = "${bindir}/systemadm"