]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use local stub if available in test-ukify
authorLuca Boccassi <luca.boccassi@gmail.com>
Sun, 26 Jan 2025 19:50:22 +0000 (19:50 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Tue, 28 Jan 2025 17:28:55 +0000 (17:28 +0000)
It might not be available on a CI system in the system
path, so use the local one if it was built

src/ukify/test/test_ukify.py

index 0f974b3558b3f130e41d5590cd18952895f9a738..24359129bbe59e11fc25a903e98c60e76f367c78 100755 (executable)
@@ -59,6 +59,8 @@ except ValueError:
     slow_tests = True
 
 arg_tools = ['--tools', build_root] if build_root else []
+if build_root and pathlib.Path(f"{build_root}/linux{ukify.guess_efi_arch()}.efi.stub").exists():
+    arg_tools += ['--stub', f"{build_root}/linux{ukify.guess_efi_arch()}.efi.stub"]
 
 def systemd_measure():
     opts = ukify.create_parser().parse_args(arg_tools)
@@ -657,7 +659,7 @@ def test_inspect(kernel_initrd, tmp_path, capsys):
         f'--os-release={osrel_arg}',
         f'--uname={uname_arg}',
         f'--output={output}',
-    ]
+    ] + arg_tools
     if slow_tests:
         args += [
             f'--secureboot-certificate={cert.name}',