mirror of
https://github.com/troglobit/finit.git
synced 2026-10-01 05:22:48 +07:00
The bus can already answer questions and change services, so give initctl the two things it still did another way: watching signals as they happen, and getting or setting user conditions. The dbus tests move with it, split by area rather than one file that grew every time the library did. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
21 lines
643 B
Bash
21 lines
643 B
Bash
# shellcheck shell=sh
|
|
# Shared preamble for the D-Bus smoke tests. Expects test/lib/setup.sh
|
|
# to have been sourced already (so texec, skip, retry, say, assert are
|
|
# available). Skips the test when the libink-driven client was not
|
|
# built, otherwise blocks until the bus socket appears.
|
|
#
|
|
# Exports: CLIENT, BUS.
|
|
|
|
command -v texec >/dev/null \
|
|
|| { echo "dbus-setup.sh: source test/lib/setup.sh first" >&2; exit 99; }
|
|
|
|
CLIENT=/sbin/dbus-auth-client
|
|
BUS=/run/finit/bus
|
|
|
|
if ! texec test -x "$CLIENT"; then
|
|
skip "dbus-auth-client not built (configured with --disable-dbus?)"
|
|
fi
|
|
|
|
say "Wait for $BUS to appear"
|
|
retry "texec test -S $BUS"
|