1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-02-12 21:57:27 +03:00

test: make the root/data partition size configurable per test

(cherry picked from commit 0334afe4d01b0f24d06995bb3ee4f5c2ff7d58c6)
This commit is contained in:
Frantisek Sumsal 2023-06-05 09:39:51 +02:00 committed by Luca Boccassi
parent 04e0ed93ee
commit 7977cbd830
2 changed files with 7 additions and 2 deletions

View File

@ -4,6 +4,7 @@ set -e
TEST_DESCRIPTION="test systemd-repart"
IMAGE_NAME="repart"
IMAGE_ADDITIONAL_ROOT_SIZE=1000
TEST_FORCE_NEWIMAGE=1
# shellcheck source=test/test-functions

View File

@ -1445,8 +1445,12 @@ create_empty_image() {
root_size=$((4 * root_size))
data_size=$((2 * data_size))
fi
if [ "$IMAGE_NAME" = "repart" ]; then
root_size=$((root_size+=1000))
if [[ "${IMAGE_ADDITIONAL_ROOT_SIZE:-0}" -gt 0 ]]; then
root_size=$((root_size + IMAGE_ADDITIONAL_ROOT_SIZE))
fi
if [[ "${IMAGE_ADDITIONAL_DATA_SIZE:-0}" -gt 0 ]]; then
data_size=$((data_size + IMAGE_ADDITIONAL_DATA_SIZE))
fi
echo "Setting up ${IMAGE_PUBLIC:?} (${root_size} MB)"