mirror of
https://git.yoctoproject.org/poky
synced 2026-09-19 18:49:32 +02:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
427e369409
commit
8c0148f7b9
@@ -1,5 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
cd tests
|
||||||
tar -C test -xJf test/sys.tar.xz
|
tar -C test -xJf test/sys.tar.xz
|
||||||
make test/rules-test.sh.log
|
make check-TESTS
|
||||||
make test/udev-test.pl.log
|
cd ..
|
||||||
|
|||||||
@@ -197,6 +197,8 @@ do_configure_prepend() {
|
|||||||
else
|
else
|
||||||
cp -r ${S}/units ${S}/units.pre_sed
|
cp -r ${S}/units ${S}/units.pre_sed
|
||||||
fi
|
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() {
|
do_install() {
|
||||||
@@ -264,19 +266,27 @@ do_install() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
do_install_ptest () {
|
do_install_ptest () {
|
||||||
install -d ${D}${PTEST_PATH}/test
|
# install data files needed for tests
|
||||||
cp -rfL ${S}/test/* ${D}${PTEST_PATH}/test
|
install -d ${D}${PTEST_PATH}/tests/test
|
||||||
install -m 0755 ${B}/test-udev ${D}${PTEST_PATH}/
|
cp -rfL ${S}/test/* ${D}${PTEST_PATH}/tests/test
|
||||||
install -d ${D}${PTEST_PATH}/build-aux
|
sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/tests/test/udev-test.pl
|
||||||
cp ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
|
|
||||||
cp -rf ${B}/rules ${D}${PTEST_PATH}/
|
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.
|
# This directory needs to be there for udev-test.pl to work.
|
||||||
install -d ${D}${libdir}/udev/rules.d
|
install -d ${D}${libdir}/udev/rules.d
|
||||||
cp ${B}/Makefile ${D}${PTEST_PATH}/
|
|
||||||
cp ${S}/test/sys.tar.xz ${D}${PTEST_PATH}/test
|
# install actual test binaries
|
||||||
sed -i 's/"tree"/"ls"/' ${D}${PTEST_PATH}/test/udev-test.pl
|
install -m 0755 ${B}/test-* ${D}${PTEST_PATH}/tests/
|
||||||
sed -i 's#${S}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
|
install -m 0755 ${B}/.libs/test-* ${D}${PTEST_PATH}/tests/
|
||||||
sed -i 's#${B}#${PTEST_PATH}#g' ${D}${PTEST_PATH}/Makefile
|
|
||||||
|
install ${B}/Makefile ${D}${PTEST_PATH}/tests/
|
||||||
}
|
}
|
||||||
|
|
||||||
python populate_packages_prepend (){
|
python populate_packages_prepend (){
|
||||||
@@ -312,7 +322,12 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
|
|||||||
FILES_${PN}-initramfs = "/init"
|
FILES_${PN}-initramfs = "/init"
|
||||||
RDEPENDS_${PN}-initramfs = "${PN}"
|
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}-ptest += "${libdir}/udev/rules.d"
|
||||||
|
|
||||||
FILES_${PN}-gui = "${bindir}/systemadm"
|
FILES_${PN}-gui = "${bindir}/systemadm"
|
||||||
|
|||||||
Reference in New Issue
Block a user