[OE-core] [PATCH] glib-2.0: fix the ptest
rongqing.li at windriver.com
rongqing.li at windriver.com
Wed Jan 20 02:08:16 UTC 2016
From: Roy Li <rongqing.li at windriver.com>
1. the ptest should not be run by root user, otherwise test_stdio_wrappers
will failure since root can enter any dir without exec permission, but the
ptest expect the failure
1_2.44.1-r0/glib-2.44.1/glib/tests/fileutils.c:864:test_stdio_wrappers: assertion failed: (errno == EACCES)
2. if X11 DISTRO_FEATURE is not enabled, not run gdbus-serialization.test
#dbus-launch --autolaunch=7df84bc5a72041a581d2f44505e7e882 --binary-syntax --close-stderr
Autolaunch requested, but X11 support not compiled in
Signed-off-by: Roy Li <rongqing.li at windriver.com>
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
---
meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 4 +++-
meta/recipes-core/glib-2.0/glib.inc | 6 ++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
index 130ae09..5b85e8f 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
+++ b/meta/recipes-core/glib-2.0/glib-2.0/run-ptest
@@ -1,3 +1,5 @@
#! /bin/sh
-gnome-desktop-testing-runner glib
+useradd glib2-test
+su glib2-test -c gnome-desktop-testing-runner glib
+userdel glib2-test
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index 785d4d7..06e6825 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -71,6 +71,12 @@ do_install_append () {
if [ -f ${D}${bindir}/glib-mkenums ]; then
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums
fi
+
+ if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then
+ if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then
+ rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test
+ fi
+ fi
}
RDEPENDS_${PN}-ptest += "\
--
2.5.0
More information about the Openembedded-core
mailing list