Changed general option -k -c -f in releng_getopts.inc

This commit is contained in:
Thomas Schmitt 2011-07-15 14:10:05 +00:00
parent feed351d0e
commit 54855eb89e
1 changed files with 14 additions and 20 deletions

View File

@ -6,7 +6,7 @@ SELF=$(basename $0)
RELENG_XORRISO=0
KEEP=0
SIMULATE_FAILURE=0
CLEANUP=1
CLEANUP=0
RELENG_PRINTED_HELP=0
START_DIR_DONT_CHANGE=`pwd`
@ -16,14 +16,13 @@ GEN_DATA_DIR=releng_generated_data/${SELF}
print_help() {
cat << EOF
Usage: $SELF -x path/to/xorriso [-k0|1] [-f0|1] [-c0|1] [-h]
Usage: $SELF -x path/to/xorriso [-k] [-f] [-c] [-h]
[-- ...test specific options...]
General options:
-x absolute or relative path to binary to be run.
-k keep selfgenerated data (values 0,1, default 0).
-c cleanup selfgenerated data kept from previous
run and exit (values 0,1, default 0).
-f simulate failure (values 0,1, default 0).
-x absolute or relative path to xorriso binary to be run.
-k keep selfgenerated data.
-c cleanup selfgenerated data kept from previous run and exit.
-f simulate failure.
-- end of general options, begin of test specific options.
EOF
}
@ -83,6 +82,8 @@ cleanup() {
fi
}
#############################################
check_for_xorriso() {
# $1: if "-x" then check executability
@ -90,7 +91,8 @@ check_for_xorriso() {
then
print_help
# print_specific_help
echo "${SELF}: Need -x absolute or relative path to binary to be run."
echo
echo "${SELF}: Need -x absolute or relative path to xorriso binary."
echo
exit 31
fi
@ -98,6 +100,7 @@ check_for_xorriso() {
then
print_help
# print_specific_help
echo
echo "${SELF}: Path given by option -x does not lead to an executable file."
echo "Given is: '$RELENG_XORRISO'"
if test "$RELENG_XORRISO" = "xorriso"
@ -129,22 +132,13 @@ do
elif test x"$i" = x"-x"
then
next_is="x"
elif test x"$i" = x"-k" -o x"$i" = x"-k0"
then
KEEP=0
elif test x"$i" = x"-k1"
elif test x"$i" = x"-k"
then
KEEP=1
elif test x"$i" = x"-c" -o x"$i" = x"-c0"
then
CLEANUP=0
elif test x"$i" = x"-c1"
elif test x"$i" = x"-c"
then
CLEANUP=1
elif test x"$i" = x"-f" -o x"$i" = x"-f0"
then
SIMULATE_FAILURE=0
elif test x"$i" = x"-f1"
elif test x"$i" = x"-f"
then
SIMULATE_FAILURE=1
elif test x"$i" = x"-h"