Compare commits
2 Commits
66012a64b6
...
ded9b60bf7
Author | SHA1 | Date | |
---|---|---|---|
ded9b60bf7 | |||
0b1e670d88 |
|
@ -2,9 +2,7 @@
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
- qemu-utils
|
|
||||||
- parted
|
- parted
|
||||||
- jq
|
- jq
|
||||||
- kmod
|
|
||||||
script:
|
script:
|
||||||
- ./test.sh
|
- ./test.sh
|
||||||
|
|
|
@ -79,7 +79,7 @@ function version_from_partnum
|
||||||
local partnum="$2"
|
local partnum="$2"
|
||||||
version="$(parted -m "$drive" -- print|awk -F: \
|
version="$(parted -m "$drive" -- print|awk -F: \
|
||||||
-v partnum="$partnum" \
|
-v partnum="$partnum" \
|
||||||
'{if (NR > 2 && $1 == partnum && $1 >= 2 && $1 <= 4 &&
|
'{if (NR > 2 && $1 == partnum &&
|
||||||
$6 != "root unused") {
|
$6 != "root unused") {
|
||||||
print $6
|
print $6
|
||||||
}}')"
|
}}')"
|
||||||
|
|
|
@ -25,7 +25,8 @@ function test_partitioning()
|
||||||
|
|
||||||
find_unused "$img"
|
find_unused "$img"
|
||||||
assertEquals "find_unused" 3 "$unused"
|
assertEquals "find_unused" 3 "$unused"
|
||||||
assertEquals "version_from_partnum unused" "" "$unused"
|
version_from_partnum "$img" 3
|
||||||
|
assertEquals "version_from_partnum unused" "" "$version"
|
||||||
|
|
||||||
rename_partition "$img" 3 "root $min_version"
|
rename_partition "$img" 3 "root $min_version"
|
||||||
find_oldest "$img"
|
find_oldest "$img"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user