File: dbus-bin

package info (click to toggle)
dbus 1.16.2-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,048 kB
  • sloc: ansic: 106,015; xml: 9,270; sh: 1,967; python: 242; makefile: 230; cpp: 27
file content (62 lines) | stat: -rwxr-xr-x 1,657 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/sh
set -eu

# Check that dbus-bin provides its intended command-line interface.
#
# We can't really *use* any of these without dbus-daemon, but we can
# at least check that they are shipped in the package and can be run.

export LC_ALL=C.UTF-8
fail=

# dbus-bin.deb provides dbus-cleanup-sockets in PATH
dbus-cleanup-sockets --help

# dbus-bin.deb provides dbus-monitor in PATH
dbus-monitor --help

# dbus-bin.deb provides dbus-send in PATH
dbus-cleanup-sockets --help
output="$(dbus-send --help 2>&1 || :)"
echo "$output"

case "$output" in
    (Usage:\ dbus-send*)
        ;;
    (*)
        echo "Unexpected output from dbus-send" >&2
        fail=yes
        ;;
esac

# dbus-bin.deb provides dbus-update-activation-environment in PATH
output="$(dbus-update-activation-environment --help 2>&1 || :)"
echo "$output"

case "$output" in
    (*Options:*)
        ;;
    (*)
        echo "Unexpected output from dbus-update-activation-environment" >&2
        fail=yes
        ;;
esac

# dbus-bin.deb provides dbus-uuidgen in PATH
rm -f "$AUTOPKGTEST_TMP/uuid"
dbus-uuidgen --ensure="$AUTOPKGTEST_TMP/uuid"
uuid="$(cat "$AUTOPKGTEST_TMP/uuid")"
echo "uuid: $uuid"
set -x
test -n "$uuid" || fail=yes
# The UUID consists of 32 lower-case hex digits (and the file
# also has a newline)
test "$uuid" = "$(perl -pe 'print "wrong: " unless /\A[a-z0-9]{32}\n\z/' "$AUTOPKGTEST_TMP/uuid")" || fail=yes
test "$uuid" = "$(dbus-uuidgen --get="$AUTOPKGTEST_TMP/uuid")" || fail=yes
test "" = "$(dbus-uuidgen --ensure="$AUTOPKGTEST_TMP/uuid")" || fail=yes
test "$uuid" = "$(cat "$AUTOPKGTEST_TMP/uuid")" || fail=yes
set +x

test -z "$fail"

# vim:set sw=4 sts=4 et: