diff options
author | Simon McVittie <smcv@collabora.com> | 2017-06-08 17:04:24 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2017-06-08 18:30:39 +0100 |
commit | ffa410a0403dcba0116f644749c82e7fc2a0c49f (patch) | |
tree | 307407bcf138c1880a7b7204a1c4dbc0b52446f5 /test/test-dbus-launch-eval.sh | |
parent | 015a5cf36d431a7431d67185f87398368508c488 (diff) | |
download | dbus-ffa410a0403dcba0116f644749c82e7fc2a0c49f.tar.gz |
tests: Don't exercise GetMachineId() or autolaunch if no machine ID
At the moment there is a hack in the implementation of GetMachineId()
to stop tests from failing during "make check" on a system where
dbus has never been installed, by silently generating a new unique
fake "machine ID" for each process. I'm about to change that
behaviour to report errors properly; skip affected test-cases if we
can't read the real machine ID.
The shell scripts to test dbus-launch are run both as "make check"
tests (for which it is valid for dbus to be not correctly installed)
and as installed-tests (for which that is not valid), so make them
pass during "make check" but fail during installed testing.
The tests in bus/ and test/name-test/ are only run during "make check"
so they only have the code path where they are skipped.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=13194
Diffstat (limited to 'test/test-dbus-launch-eval.sh')
-rwxr-xr-x | test/test-dbus-launch-eval.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/test-dbus-launch-eval.sh b/test/test-dbus-launch-eval.sh index 7b5a66d4..cd960650 100755 --- a/test/test-dbus-launch-eval.sh +++ b/test/test-dbus-launch-eval.sh @@ -28,6 +28,7 @@ export DBUS_DEBUG_OUTPUT=1 echo "# dbus-daemon binary: ${DBUS_TEST_DAEMON:=dbus-daemon}" echo "# dbus-launch binary: ${DBUS_TEST_DBUS_LAUNCH:=dbus-launch}" echo "# dbus-send binary: ${DBUS_TEST_DBUS_SEND:=dbus-send}" +echo "# dbus-uuidgen binary: ${DBUS_TEST_DBUS_UUIDGEN:=dbus-uuidgen}" if test -n "$DBUS_TEST_DATA"; then echo "# test data: $DBUS_TEST_DATA" @@ -41,6 +42,16 @@ else config="--sh-syntax" fi +if ! "${DBUS_TEST_DBUS_UUIDGEN}" --get >/dev/null; then + if test -n "$DBUS_TEST_UNINSTALLED"; then + echo "1..0 # SKIP - Unable to test dbus-launch without a machine ID" + exit 0 + else + echo "Bail out! dbus not correctly installed: no machine ID" + exit 1 + fi +fi + echo "1..1" unset DBUS_SESSION_BUS_ADDRESS |