summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-06-17 11:12:22 +0200
committerMichał Górny <mgorny@gentoo.org>2019-06-17 11:12:45 +0200
commit193a8b642d00a499a3cd92bb794e0494446fc8c2 (patch)
treeee3ca82c88d9d023638eab91b7ede5c902cd0ce7 /xfce-base
parentsys-apps/shadow: Bump to version 4.7 (diff)
downloadgentoo-193a8b642d00a499a3cd92bb794e0494446fc8c2.tar.gz
gentoo-193a8b642d00a499a3cd92bb794e0494446fc8c2.tar.bz2
gentoo-193a8b642d00a499a3cd92bb794e0494446fc8c2.zip
xfce-base/xfconf: Fix tests to run without xfconf installed
Start D-Bus session bus with correct service file to make sure xfconf D-Bus tests can spawn and communicate with the daemon. While at it, get rid of unnecessary Xvfb. Closes: https://bugs.gentoo.org/629608 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'xfce-base')
-rw-r--r--xfce-base/xfconf/xfconf-4.12.1-r1.ebuild30
-rw-r--r--xfce-base/xfconf/xfconf-4.13.7.ebuild29
2 files changed, 36 insertions, 23 deletions
diff --git a/xfce-base/xfconf/xfconf-4.12.1-r1.ebuild b/xfce-base/xfconf/xfconf-4.12.1-r1.ebuild
index 0f7f61db433d..369075b38785 100644
--- a/xfce-base/xfconf/xfconf-4.12.1-r1.ebuild
+++ b/xfce-base/xfconf/xfconf-4.12.1-r1.ebuild
@@ -3,7 +3,7 @@
EAPI=6
-inherit virtualx xdg-utils
+inherit xdg-utils
DESCRIPTION="A configuration management system for Xfce"
HOMEPAGE="https://www.xfce.org/projects/"
@@ -57,20 +57,26 @@ src_compile() {
emake OTHERLDFLAGS="${LDFLAGS}"
}
-my_test() {
- local out=$(./xfconfd/xfconfd --daemon) || return 1
- eval "${out}"
+src_test() {
+ local service_dir=${HOME}/.local/share/dbus-1/services
+ mkdir -p "${service_dir}" || die
+ cat > "${service_dir}/org.xfce.Xfconf.service" <<-EOF || die
+ [D-BUS Service]
+ Name=org.xfce.Xfconf
+ Exec=${S}/xfconfd/xfconfd
+ EOF
- local ret=0
- # https://bugzilla.xfce.org/show_bug.cgi?id=13840
- nonfatal emake -j1 check || ret=1
+ (
+ # start isolated dbus session bus
+ dbus_data=$(dbus-launch --sh-syntax) || exit
+ eval "${dbus_data}"
- kill "${XFCONFD_PID}" || ewarn "Unable to kill xfconfd"
- return "${ret}"
-}
+ nonfatal emake check
+ ret=${?}
-src_test() {
- virtx my_test
+ kill "${DBUS_SESSION_BUS_PID}"
+ exit "${ret}"
+ ) || die
}
src_install() {
diff --git a/xfce-base/xfconf/xfconf-4.13.7.ebuild b/xfce-base/xfconf/xfconf-4.13.7.ebuild
index 82b928dbe4b7..8e6b32d8356c 100644
--- a/xfce-base/xfconf/xfconf-4.13.7.ebuild
+++ b/xfce-base/xfconf/xfconf-4.13.7.ebuild
@@ -3,7 +3,7 @@
EAPI=7
-inherit virtualx xdg-utils
+inherit xdg-utils
DESCRIPTION="A configuration management system for Xfce"
HOMEPAGE="https://www.xfce.org/projects/"
@@ -48,19 +48,26 @@ src_compile() {
emake OTHERLDFLAGS="${LDFLAGS}"
}
-my_test() {
- local out=$(./xfconfd/xfconfd --daemon) || return 1
- eval "${out}"
+src_test() {
+ local service_dir=${HOME}/.local/share/dbus-1/services
+ mkdir -p "${service_dir}" || die
+ cat > "${service_dir}/org.xfce.Xfconf.service" <<-EOF || die
+ [D-BUS Service]
+ Name=org.xfce.Xfconf
+ Exec=${S}/xfconfd/xfconfd
+ EOF
- local ret=0
- nonfatal emake check || ret=1
+ (
+ # start isolated dbus session bus
+ dbus_data=$(dbus-launch --sh-syntax) || exit
+ eval "${dbus_data}"
- kill "${XFCONFD_PID}" || ewarn "Unable to kill xfconfd"
- return "${ret}"
-}
+ nonfatal emake check
+ ret=${?}
-src_test() {
- virtx my_test
+ kill "${DBUS_SESSION_BUS_PID}"
+ exit "${ret}"
+ ) || die
}
src_install() {