pass params by console or file ini
test automation
we can pass input user by console args or by particular ini file
-
--ini="test.ini"
or --mount.root="/dev/sda44"
One function getvar
replace ini()
for read values
test.ini file :
[mount]
root = /dev/sda55
/dev/sda55 = ext4
in this test, manjaro-architect dont show the dialog for choice root partition if config is pass by param or by ini file
only this dialog is rewrited for this test and choice format
local PARTITION=$(getvar "mount.root")
if [[ -z "$PARTITION" ]]; then
DIALOG " $_PrepMntPart " --menu "\n$_SelRootBody\n " 0 0 12 ${PARTITIONS} 2>${ANSWER} || return 0
PARTITION=$(cat ${ANSWER})
fi
ROOT_PART=${PARTITION}
Normally we should copy the contents of the ini file as input when loading into the ini file in /tmp/. Not written here