test_ukify: explicitly remove big temporary directories
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 8 Dec 2023 18:10:09 +0000 (19:10 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 8 Dec 2023 18:17:40 +0000 (19:17 +0100)
commitef0a69eb90292ec3fa11564fe6005ed06121f260
tree3adf663cb1cc092f6b707fd4b3145afdaf7d5507
parent6f1df1ff3cf399f3b69a3c15b348e2337bc49a5b
test_ukify: explicitly remove big temporary directories

pytest intentionally keeps around a limited number of the previous test
temporary directories [1]. This is generally OK, but in our tests that generate
initrds, we create a few very large files (both the initrd and kernel in a few
copies), which quickly adds up. I had a particularly large initrd (because of
some mkosi-initrd shenanigans), and I unded up with dozens of gigabytes of
temporary files from the tests. Let's just nuke the dirs where we write
kernel data.

[1] https://github.com/pytest-dev/pytest/issues/543
src/ukify/test/test_ukify.py