Prepared test proposal for option -f and for incomplete option -x

This commit is contained in:
Thomas Schmitt 2011-07-14 12:24:48 +00:00
parent 09cfd395d0
commit 92d0f9440c
2 changed files with 18 additions and 0 deletions

View File

@ -136,6 +136,15 @@ do
fi
done
if test "$next_is" = x
then
echo >&2
echo "Option -x expects an argument (the path to the xorriso program)" >&2
print_help
exit 31
fi
# no_getopts = 1
else
# no_getopts != 1

View File

@ -10,6 +10,7 @@ print_specific_help() {
# Print own help text
echo "Test specific options:"
echo " --dev path Suppress dialog and use path as drive address."
echo "This test insists in getting a path to xorriso by option -x."
echo
}
@ -144,6 +145,14 @@ get_devices() {
echo -e "\n${SELF}: Running: $RELENG_XORRISO -devices..."
devices=$("$RELENG_XORRISO" -report_about WARNING -devices | grep "\-dev")
RET="$?"
if test "$SIMULATE_FAILURE" = 1
then
echo "===" >&2
echo "=== SIMULATING FAILURE BY OVERRIDING EXIT VALUE OF XORRISO" >&2
echo "===" >&2
echo "FAIL : ${SELF} : Simulated failure caused by option -f"
RET=1
fi
case ${RET} in
0)
get_devices "$devices" "$dev"