1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

tests: up the image size a little, use twice that size with STRIP_BINARIES=no

to make sure that there's enough room for unstripped binaries.
This commit is contained in:
Evgeny Vereshchagin 2018-06-30 05:19:01 +00:00 committed by Lennart Poettering
parent 11ce0db2e2
commit 28c7474e60

View File

@ -359,14 +359,18 @@ install_missing_libraries() {
}
create_empty_image() {
local _size=500
if [[ "$STRIP_BINARIES" = "no" ]]; then
_size=$((2*_size))
fi
rm -f "$TESTDIR/rootdisk.img"
# Create the blank file to use as a root filesystem
dd if=/dev/null of="$TESTDIR/rootdisk.img" bs=1M seek=400
dd if=/dev/null of="$TESTDIR/rootdisk.img" bs=1M seek="$_size"
LOOPDEV=$(losetup --show -P -f $TESTDIR/rootdisk.img)
[ -b "$LOOPDEV" ] || return 1
echo "LOOPDEV=$LOOPDEV" >> $STATEFILE
sfdisk "$LOOPDEV" <<EOF
,390M
,$((_size-10))M
,
EOF