Skip to content

Commit 7977cbd

Browse files
mrc0mmandbluca
authored andcommitted
test: make the root/data partition size configurable per test
(cherry picked from commit 0334afe)
1 parent 04e0ed9 commit 7977cbd

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

test/TEST-58-REPART/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ set -e
44

55
TEST_DESCRIPTION="test systemd-repart"
66
IMAGE_NAME="repart"
7+
IMAGE_ADDITIONAL_ROOT_SIZE=1000
78
TEST_FORCE_NEWIMAGE=1
89

910
# shellcheck source=test/test-functions

test/test-functions

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,12 @@ create_empty_image() {
14451445
root_size=$((4 * root_size))
14461446
data_size=$((2 * data_size))
14471447
fi
1448-
if [ "$IMAGE_NAME" = "repart" ]; then
1449-
root_size=$((root_size+=1000))
1448+
1449+
if [[ "${IMAGE_ADDITIONAL_ROOT_SIZE:-0}" -gt 0 ]]; then
1450+
root_size=$((root_size + IMAGE_ADDITIONAL_ROOT_SIZE))
1451+
fi
1452+
if [[ "${IMAGE_ADDITIONAL_DATA_SIZE:-0}" -gt 0 ]]; then
1453+
data_size=$((data_size + IMAGE_ADDITIONAL_DATA_SIZE))
14501454
fi
14511455

14521456
echo "Setting up ${IMAGE_PUBLIC:?} (${root_size} MB)"

0 commit comments

Comments
 (0)