From e9984357ad60f087528fbdfd6f4577e93fca8cee Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rg=20Behrmann?= Date: Thu, 10 Oct 2024 13:52:31 +0200 Subject: [PATCH] ukify: Fix systemd-measure detection in tests Fixes: 206fa93c854e3d5c94e56da9b53e107245f31503 --- src/ukify/test/test_ukify.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py index a08996cb55c..48182483c28 100755 --- a/src/ukify/test/test_ukify.py +++ b/src/ukify/test/test_ukify.py @@ -690,7 +690,9 @@ def test_inspect(kernel_initrd, tmp_path, capsys): def test_pcr_signing(kernel_initrd, tmp_path): if kernel_initrd is None: pytest.skip('linux+initrd not found') - if systemd_measure() is None: + try: + systemd_measure() + except ValueError: pytest.skip('systemd-measure not found') ourdir = pathlib.Path(__file__).parent @@ -757,7 +759,9 @@ def test_pcr_signing(kernel_initrd, tmp_path): def test_pcr_signing2(kernel_initrd, tmp_path): if kernel_initrd is None: pytest.skip('linux+initrd not found') - if systemd_measure() is None: + try: + systemd_measure() + except ValueError: pytest.skip('systemd-measure not found') ourdir = pathlib.Path(__file__).parent -- 2.47.3