Unit tests fail when a GLib warning is emitted
I'm running unit tests on a program that uses GTK, and the following warning is always emitted by my test executable, before the actual tests start, when I call gtk_init():
dbind-WARNING **: 22:10:21.866: AT-SPI: Error retrieving accessibility bus address: org.freedesktop.DBus.Error.ServiceUnknown: org.freedesktop.DBus.Error.ServiceUnknown
When I run the test executable from the runtime terminal, it succeeds. However, when I use the "Unit Tests" section of the sidebar, because Builder adds the G_DEBUG=fatal-warnings environment variable, the test fails. G_DEBUG=fatal-warnings is not necessary, because inside a test, a warning/error will fail the test even if the variable is not present.