[Pkg-vala-maintainers] Bug#836067: vala: please use dbus-run-session, or dbus-daemon directly, in tests
Simon McVittie
smcv at debian.org
Tue Aug 30 11:10:46 UTC 2016
Source: vala
Version: 0.32.1-1
Severity: normal
Tags: upstream
User: dbus at packages.debian.org
Usertags: dbus-launch dbus-launch-for-tests
As described in <https://lists.debian.org/debian-devel/2016/08/msg00554.html>
I'm trying to reduce how much dbus-launch is used in Debian.
This package currently uses dbus-launch in its unit tests.
The test executable could be run through dbus-run-session(1), which is
available since dbus 1.8, the upstream "old stable" branch available in
Debian stable:
dbus-run-session -- some-test
For example, I think this pseudo-patch would work:
+run_prefix=""
...
function testheader() {
if [ "$1" = "Packages:" ]; then
shift
PACKAGES="$PACKAGES $@"
elif [ "$1" = "D-Bus" ]; then
- echo 'eval `dbus-launch --sh-syntax`' >> prepare
- echo 'trap "kill $DBUS_SESSION_BUS_PID" INT TERM EXIT' >> prepare
+ run_prefix="dbus-run-session -- $run_prefix"
elif [ "$1" = "GIR" ]; then
GIRTEST=1
fi
}
...
-if bash $ns.check &>log; then
+if $run_prefix bash $ns.check &>log; then
Alternatively, this Flatpak commit illustrates how `eval dbus-launch`
can be replaced by invoking dbus-daemon directly, avoiding the
X11-specific dbus-launch:
<https://github.com/flatpak/flatpak/commit/6cc8062cfb3f9410d54a27e7ccca77c103e441e8>.
Thanks,
S
More information about the Pkg-vala-maintainers
mailing list