testsuite: Get along with running gvfs/nautilus
authorMartin Pitt <martin.pitt@ubuntu.com>
Fri, 12 Mar 2010 12:10:06 +0000 (13:10 +0100)
committerMartin Pitt <martin.pitt@ubuntu.com>
Fri, 12 Mar 2010 12:10:06 +0000 (13:10 +0100)
Send a SIGSTOP to all gvfs-gdu-volume-monitor processes while the test suite is
running, to avoid nautilus windows popping up by the dozens, and causing "busy"
failures.

tests/run

index a6042ee..eb01b4b 100755 (executable)
--- a/tests/run
+++ b/tests/run
@@ -115,6 +115,9 @@ class UDisksTestCase(unittest.TestCase):
         # start with a clean slate: zero out device 
         klass.zero_device()
 
+        # inhibit GNOME automounting/nautilus pop ups
+        subprocess.call(['killall', '-STOP', 'gvfs-gdu-volume-monitor'])
+
         # start daemon
         if logfile:
             klass.daemon_log = open(logfile, 'w')
@@ -144,6 +147,9 @@ class UDisksTestCase(unittest.TestCase):
         os.wait()
         klass.daemon = None
 
+        # resume GNOME automounting/nautilus pop ups
+        subprocess.call(['killall', '-CONT', 'gvfs-gdu-volume-monitor'])
+
     @classmethod
     def sync(klass):
         '''Wait until pending events finished processing.'''