[displaymanager] Skip greetd test if there's no toml

toml is needed for greetd, but that shouldn't stop the tests
from running.

(cherry picked from commit 065647154e)
This commit is contained in:
Adriaan de Groot 2022-08-23 16:04:24 +02:00
parent c8eec51c5a
commit d7254f6f82

View File

@ -17,6 +17,14 @@ try:
except FileNotFoundError as e:
pass
try:
import toml
except ImportError:
# This is a failure of the test-environment.
import sys
print("Can't find module toml.", file=sys.stderr)
sys.exit(0)
# Specific DM test
d = main.DMgreetd("/tmp")
d.set_autologin("d", True, default_desktop_environment)