Files
finit/test/lib/dbus-setup.sh
T
Joachim Wiberg dd1390a6c2 initctl: monitor and condition control over the bus
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>
2026-08-13 09:28:14 +02:00

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"