diff options
| author | Roy Li <rongqing.li@windriver.com> | 2016-01-20 10:08:16 +0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-01-24 09:40:22 +0000 |
| commit | 03dae8e8b3df5d1d2c98f756285ab8e7009dacf5 (patch) | |
| tree | 3dce6c04a8546d299e6b81cf7174231f86165baa | |
| parent | 68c5e6d4d089568ab726153ea7dc217d16293c93 (diff) | |
| download | poky-03dae8e8b3df5d1d2c98f756285ab8e7009dacf5.tar.gz | |
glib-2.0: fix the ptest
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
(From OE-Core rev: 9f79c1e0ebdbd300284ace3cb8d01d6ea98ba077)
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib-2.0/run-ptest | 4 | ||||
| -rw-r--r-- | meta/recipes-core/glib-2.0/glib.inc | 6 |
2 files changed, 9 insertions, 1 deletions
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 130ae09b6c..5b85e8fabe 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 @@ | |||
| 1 | #! /bin/sh | 1 | #! /bin/sh |
| 2 | 2 | ||
| 3 | gnome-desktop-testing-runner glib | 3 | useradd glib2-test |
| 4 | su glib2-test -c gnome-desktop-testing-runner glib | ||
| 5 | userdel glib2-test | ||
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc index 785d4d7a42..06e6825643 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 () { | |||
| 71 | if [ -f ${D}${bindir}/glib-mkenums ]; then | 71 | if [ -f ${D}${bindir}/glib-mkenums ]; then |
| 72 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums | 72 | sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' ${D}${bindir}/glib-mkenums |
| 73 | fi | 73 | fi |
| 74 | |||
| 75 | if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; then | ||
| 76 | if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", "true", d)}; then | ||
| 77 | rm ${D}${datadir}/installed-tests/glib/gdbus-serialization.test | ||
| 78 | fi | ||
| 79 | fi | ||
| 74 | } | 80 | } |
| 75 | 81 | ||
| 76 | RDEPENDS_${PN}-ptest += "\ | 82 | RDEPENDS_${PN}-ptest += "\ |
