[gvfs/wip/oholy/test-suite-fix: 15/15] test: Prevent failures caused by wrong monitor dir



commit 7da3b0ba2e207ce0b8a1bdfe023d6cf6d3764ed9
Author: Ondrej Holy <oholy redhat com>
Date:   Tue Aug 28 10:48:21 2018 +0200

    test: Prevent failures caused by wrong monitor dir
    
    Test suite uses custom servicedir with subset of monitor service files,
    however, list of available monitors is read from the system locations.
    Thus gvfs tries to spawn volume monitors, which are not available in the
    custom servicedir. Consequently, the following warnings are printed
    among others from "gio mount":
    
    invoking IsSupported() failed for remote volume monitor with dbus name...
    
    The warnings causes test suite failures, becasue it expects another
    output. This problem appeared recently due to the "gio mount" change,
    which now always call g_volume_monitor_get.
    
    Set GVFS_MONITOR_DIR to the same dir, where is the custom session.conf,
    which ensures that it uses .monitor files from that dir and not from
    the system locations.

 test/gvfs-test | 4 ++++
 1 file changed, 4 insertions(+)
---
diff --git a/test/gvfs-test b/test/gvfs-test
index 1bf29d68..93822c0b 100755
--- a/test/gvfs-test
+++ b/test/gvfs-test
@@ -1809,6 +1809,10 @@ def start_dbus():
     # run local D-BUS; if we run this in a built tree, use our config to pick
     # up the built services, otherwise the standard session one
     if os.path.exists(dbus_conf):
+        # Prevent test failures caused by attempts to spawn monitors which are
+        # not available in our custom servicedir.
+        env['GVFS_MONITOR_DIR'] = os.path.dirname(dbus_conf)
+
         argv = ['dbus-daemon', '--config-file', dbus_conf, '--print-address=1']
     else:
         argv = ['dbus-daemon', '--session', '--print-address=1']


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]