]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
ukify: Fix systemd-measure detection in tests
authorJörg Behrmann <behrmann@physik.fu-berlin.de>
Thu, 10 Oct 2024 11:52:31 +0000 (13:52 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Thu, 10 Oct 2024 13:59:33 +0000 (15:59 +0200)
Fixes: 206fa93c854e3d5c94e56da9b53e107245f31503
src/ukify/test/test_ukify.py

index a08996cb55cf672d56da6950bc48b88b13110603..48182483c2894e6a7efa8358a09dfde0af2b3971 100755 (executable)
@@ -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