dbus unit tests

Alec Leamas leamas.alec at gmail.com
Tue Dec 5 09:13:42 UTC 2023


Dear list,

I'm working with a program (still opencpn) which is about to bring some 
unit tests using dbus. These tests works outside the sandbox in a native 
build.

However, they fail when applied in the flatpak build. The reason seems 
to be that there is no dbus session bus, DBUS_SESSION_BUS_ADDRESS is 
undefined. Just setting  that variable doesn't help either, the 
corresponding  /run/flatpak/bus socket just doesn't exist at the time of 
the test.

To make things more more interesting, the session bus is in place if I 
run a shell using flatpak-builder in the failed build environment. The 
tests runs fine here.

It seems that there is some magic required to start up the session bus 
before running the tests. Has anyone a clue out there?

--alec


More information about the Flatpak mailing list