From: Zbigniew Jędrzejewski-Szmek Date: Fri, 21 Apr 2023 06:32:09 +0000 (+0200) Subject: test_ukify: fix two failing tests X-Git-Tag: v254-rc1~548^2~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f7e77fae1d3915c654d847a8b6c229767fe71e5;p=thirdparty%2Fsystemd.git test_ukify: fix two failing tests Fixup for 22ad038ac6e4fe5e4a68555f0e70bd0a16fb5616 and 3fc5eed47091363247012454df458e1a3303bf12. It seems that the tests are not executed properly in CI. Nevertheless, test-ukify appears in logs: rpm-build:fedora-rawhide-x86_64: 409/1191 systemd / test-ukify OK 0.16s This is strange. --- diff --git a/src/ukify/test/test_ukify.py b/src/ukify/test/test_ukify.py index 1f468906d31..7b9f855ff3c 100755 --- a/src/ukify/test/test_ukify.py +++ b/src/ukify/test/test_ukify.py @@ -91,7 +91,7 @@ def test_parse_args_many(): assert opts.sb_key == 'SBKEY' assert opts.sb_cert == 'SBCERT' assert opts.sign_kernel is False - assert opts.tools == pathlib.Path('TOOLZ/') + assert opts.tools == [pathlib.Path('TOOLZ/')] assert opts.output == pathlib.Path('OUTPUT') assert opts.measure is False @@ -109,13 +109,11 @@ def test_parse_sections(): assert opts.sections[0].name == 'test' assert isinstance(opts.sections[0].content, pathlib.Path) assert opts.sections[0].tmpfile - assert opts.sections[0].offset is None assert opts.sections[0].measure is False assert opts.sections[1].name == 'test2' assert opts.sections[1].content == pathlib.Path('FILE') assert opts.sections[1].tmpfile is None - assert opts.sections[1].offset is None assert opts.sections[1].measure is False def test_help(capsys): @@ -242,7 +240,6 @@ def test_uname_scraping(kernel_initrd): uname = ukify.Uname.scrape(kernel_initrd[0]) assert re.match(r'\d+\.\d+\.\d+', uname) - def test_efi_signing(kernel_initrd, tmpdir): if kernel_initrd is None: pytest.skip('linux+initrd not found')