mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-02 15:30:33 +01:00
tests: Don't run session-long dbus daemons for tests
They require a tty or X11 displays, thus are not suitable for headless runs (such as in mock). Furthermore, they die with the tty or X11 session, which is somehow late -- a lot of them may accumulate. Let's kill them right away.
This commit is contained in:
parent
72cafb8ca3
commit
e9bfd0e29c
2 changed files with 10 additions and 6 deletions
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Spawn DBus if there's none
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
exec dbus-launch --exit-with-session "$@"
|
||||
else
|
||||
exec "$@"
|
||||
eval `dbus-launch --sh-syntax`
|
||||
trap "kill $DBUS_SESSION_BUS_PID" EXIT
|
||||
fi
|
||||
|
||||
"$@"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,9 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Spawn DBus if there's none
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then
|
||||
exec dbus-launch --exit-with-session "$@"
|
||||
else
|
||||
exec "$@"
|
||||
eval `dbus-launch --sh-syntax`
|
||||
trap "kill $DBUS_SESSION_BUS_PID" EXIT
|
||||
fi
|
||||
|
||||
"$@"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue