From 065647154e814de45c40f3974ec406943cb9b2c3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 23 Aug 2022 16:04:24 +0200 Subject: [PATCH] [displaymanager] Skip greetd test if there's no toml toml is needed for greetd, but that shouldn't stop the tests from running. --- src/modules/displaymanager/tests/test-dm-greetd.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/displaymanager/tests/test-dm-greetd.py b/src/modules/displaymanager/tests/test-dm-greetd.py index d41c2dadf..e2682afc7 100644 --- a/src/modules/displaymanager/tests/test-dm-greetd.py +++ b/src/modules/displaymanager/tests/test-dm-greetd.py @@ -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)