[oe-commits] Chen Qi : systemd: fix ptest to make it able to run on target
git at git.openembedded.org
git at git.openembedded.org
Tue Jan 28 00:48:51 UTC 2014
Module: openembedded-core.git
Branch: master
Commit: 03ed9095b1ca54a060407f355be0ad9ec86b7610
URL: http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=03ed9095b1ca54a060407f355be0ad9ec86b7610
Author: Chen Qi <Qi.Chen at windriver.com>
Date: Mon Dec 23 03:17:18 2013 -0500
systemd: fix ptest to make it able to run on target
This patch mainly involves four changes.
1. Ship the sys.tar.xz and extract it on target to avoid ELOOP error.
2. Make systemd-ptest rdepend on bash and perl as the test cases need them.
3. Fix paths in Makefile so that the test cases could run on target.
4. Install ${libdir}/udev/rules.d directory to make udev-test.pl work.
[YOCTO #5664]
[YOCTO #5673]
[YOCTO #5674]
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
---
meta/recipes-core/systemd/systemd/run-ptest | 1 +
meta/recipes-core/systemd/systemd_208.bb | 12 ++++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/meta/recipes-core/systemd/systemd/run-ptest b/meta/recipes-core/systemd/systemd/run-ptest
index 0418bc9..2f6bd93 100644
--- a/meta/recipes-core/systemd/systemd/run-ptest
+++ b/meta/recipes-core/systemd/systemd/run-ptest
@@ -1,2 +1,3 @@
+tar -C test -xJf test/sys.tar.xz
make test/rules-test.sh.log
make test/udev-test.pl.log
diff --git a/meta/recipes-core/systemd/systemd_208.bb b/meta/recipes-core/systemd/systemd_208.bb
index 6590235..4b0fa2d 100644
--- a/meta/recipes-core/systemd/systemd_208.bb
+++ b/meta/recipes-core/systemd/systemd_208.bb
@@ -120,11 +120,15 @@ do_install_ptest () {
install ${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}/
+ # 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}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
- tar -C ${D}${PTEST_PATH}/test -xJf ${S}/test/sys.tar.xz
+ 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
}
python populate_packages_prepend (){
@@ -147,6 +151,10 @@ FILES_${PN}-analyze = "${bindir}/systemd-analyze"
FILES_${PN}-initramfs = "/init"
RDEPENDS_${PN}-initramfs = "${PN}"
+# The test cases need perl and bash to run correctly.
+RDEPENDS_${PN}-ptest += "perl bash"
+FILES_${PN}-ptest += "${libdir}/udev/rules.d"
+
FILES_${PN}-gui = "${bindir}/systemadm"
FILES_${PN}-vconsole-setup = "${rootlibexecdir}/systemd/systemd-vconsole-setup \
More information about the Openembedded-commits
mailing list