Tests: skip tests when outside of a D-Bus session
authorAlberto Mardegan <mardy@users.sourceforge.net>
Wed, 7 Mar 2012 13:26:14 +0000 (15:26 +0200)
committerAlberto Mardegan <mardy@users.sourceforge.net>
Wed, 7 Mar 2012 13:26:14 +0000 (15:26 +0200)
tests/signon-glib-test.sh

index c2b45dc3c6d295182decda0ad1f1c3d0c9986436..92dc89f29eb3023a082643db7182b08bb91e480b 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then
+    echo "No D-Bus session active; skipping tests."
+    exit 0
+fi
+
 export G_MESSAGES_DEBUG=all
 
 signon-glib-testsuite