~ubuntu-branches/ubuntu/quantal/libdbus-ruby/quantal

« back to all changes in this revision

Viewing changes to test/test_server

  • Committer: Bazaar Package Importer
  • Author(s): Paul van Tilburg
  • Date: 2010-04-09 22:47:16 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20100409224716-sbdrkrkxpyq5baip
Tags: 0.3.0-1
* New upstream release. 
* debian/source/format: Added, switched to 3.0 (quilt) format. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    # reimplementing dbus-launch because it is in dbus-1-x11.rpm
24
24
    PF=`mktemp dbus.pid.XXXXXX` || exit
25
25
    AF=`mktemp dbus.addr.XXXXXX` || exit
 
26
    RM_FILES="$RM_FILES $PF $AF"
26
27
 
27
28
    dbus-daemon --session --print-address=3 3>$AF --print-pid=4 4>$PF &
28
29
    # wait for the daemon to print the info
34
35
    done
35
36
    DBUS_SESSION_BUS_PID=$(cat $PF)
36
37
    export DBUS_SESSION_BUS_ADDRESS=$(cat $AF)
37
 
    # Clean up at exit. This will also kill the server.
38
 
    trap "kill $DBUS_SESSION_BUS_PID; rm $AF $PF" EXIT TERM INT
 
38
    KILLS="$KILLS $DBUS_SESSION_BUS_PID"
 
39
#    dbus-monitor &
39
40
}
40
41
 
41
42
setup_activation () {
56
57
}
57
58
 
58
59
export XDG_DATA_DIRS=`mktemp -d dbus.activation.XXXXXX`
 
60
RM_FILES="$RM_FILES $XDG_DATA_DIRS"
59
61
my_dbus_launch
60
62
setup_activation
61
63
#run_server
62
64
 
 
65
# Clean up at exit. This will also kill the server.
 
66
trap "kill \$KILLS; rm -rf \$RM_FILES" EXIT TERM INT
 
67
 
63
68
while [ -n "$1" ]; do
64
69
  echo Running $1
65
70
  $1 || $KEEP_GOING
66
71
  shift
67
72
done
68
73
 
69
 
rm -r $XDG_DATA_DIRS
70
74
echo Done