test: Generalize fs resizing in vm.install

This should work on RHEL as well.
This commit is contained in:
Lars Karlitski 2019-05-21 17:43:32 +02:00 committed by Martin Pitt
parent bdffaa02f4
commit 6ddaa5e0dd

View File

@ -5,8 +5,9 @@ SRPM="$1"
# Grow root partition to make room for images. This only works on Fedora right now.
echo ", +" | sfdisk -N 2 -f /dev/vda
partprobe
pvresize /dev/vda2
lvresize fedora/root -l+100%FREE -r
pvs --noheadings -opv_name | xargs pvresize
rootlv=$(findmnt --noheadings -oSOURCE /)
lvresize $rootlv -l+100%FREE -r
rm -rf build-results
su builder -c "/usr/bin/mock --no-clean --resultdir build-results --rebuild $SRPM"