From 92d0f9440c717fbbca2fea448c56d690fc339a0f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 14 Jul 2011 12:24:48 +0000 Subject: [PATCH] Prepared test proposal for option -f and for incomplete option -x --- releng/inc/releng_getopts_ts.inc | 9 +++++++++ releng/manual_devices_ts | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/releng/inc/releng_getopts_ts.inc b/releng/inc/releng_getopts_ts.inc index 2451cc99..312d8c07 100644 --- a/releng/inc/releng_getopts_ts.inc +++ b/releng/inc/releng_getopts_ts.inc @@ -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 diff --git a/releng/manual_devices_ts b/releng/manual_devices_ts index 9d397d3a..7d6f1b88 100755 --- a/releng/manual_devices_ts +++ b/releng/manual_devices_ts @@ -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"