[folks] e-d-s: kill gconfd-2 after running a test



commit b9f391ab8c4170772b27c81b0e1ce651ec37360d
Author: Raul Gutierrez Segales <rgs collabora co uk>
Date:   Wed Sep 7 15:52:27 2011 +0100

    e-d-s: kill gconfd-2 after running a test
    
    I thought we were properly cleaning up the GConf entries
    generated by each test run but it turns out that sometimes
    gconfd-2 exits /after/ we've supposedly nuked it's directory.
    So before cleaning up GConf's files we now kill gconfd-2
    to prevent it from sync-ing to disc afterwards.
    
    Helps: https://bugzilla.gnome.org/show_bug.cgi?id=658327

 tests/tools/with-session-bus-eds.sh |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/tests/tools/with-session-bus-eds.sh b/tests/tools/with-session-bus-eds.sh
index e525346..f1e854b 100755
--- a/tests/tools/with-session-bus-eds.sh
+++ b/tests/tools/with-session-bus-eds.sh
@@ -22,9 +22,16 @@ done
 shift
 if test "z$1" = "z"; then dbus_usage; fi
 
+gconf_stop ()
+{
+  local pid=$(dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.GetConnectionUnixProcessID string:org.gnome.GConf | tail -n 1 | awk ' { print $2; } ')
+  kill -KILL $pid
+}
+
 cleanup ()
 {
     eds_stop
+    gconf_stop
     dbus_stop
     test -d ../data/gconf.d && rm -rf ../data/gconf.d
 }



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