diff options
author | Luca Boccassi <bluca@debian.org> | 2024-03-20 13:55:02 +0100 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2024-03-21 12:08:18 +0100 |
commit | a82cf4902d39e52b85bcf110bf7f1ca465239769 (patch) | |
tree | 69a5bd5033ac061f6c05a09562190f6a4b963e6d /test/test-functions | |
parent | Merge pull request #31861 from yuwata/journalctl-fix-until (diff) | |
download | systemd-a82cf4902d39e52b85bcf110bf7f1ca465239769.tar.xz systemd-a82cf4902d39e52b85bcf110bf7f1ca465239769.zip |
test: delete private images on clean-again
Private images are not reused, they are unique to tests, so delete them
as they take a lot of disk space, and we are starting to run in /var/tmp
space issues on the Ubuntu CI
Diffstat (limited to 'test/test-functions')
-rw-r--r-- | test/test-functions | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test-functions b/test/test-functions index b99580bfd8..0c0ffa1545 100644 --- a/test/test-functions +++ b/test/test-functions @@ -3338,6 +3338,13 @@ test_cleanup_again() { [ -n "$TESTDIR" ] || return rm -rf "$TESTDIR/unprivileged-nspawn-root" [[ -n "$initdir" ]] && _umount_dir "$initdir" + # Test specific images are not reused, so delete them or we run out of disk space + if [[ -n "$IMAGE_PUBLIC" ]] && [ "$(basename "$IMAGE_PUBLIC")" != "default.img" ]; then + rm -vf "$IMAGE_PUBLIC" + fi + if [[ -n "$IMAGE_PRIVATE" ]] && [ "$(basename "$IMAGE_PRIVATE")" != "default.img" ]; then + rm -vf "$IMAGE_PRIVATE" + fi } test_create_image() { |