Proposal for test ./manual_devices and inc/releng_getopts_ts.inc

This commit is contained in:
2011-07-14 11:57:50 +00:00
parent a481f41d1c
commit 2f32e55e0f
2 changed files with 241 additions and 13 deletions

View File

@ -6,36 +6,63 @@
# set -e
# Include common bits
if test -e inc/releng_getopts.inc
print_specific_help() {
# Print own help text
echo "Test specific options:"
echo " --dev path Suppress dialog and use path as drive address."
echo
}
# Include common bits and interpret general options
getopts_ts=1
if test "$getopts_ts" = 1
then
. inc/releng_getopts.inc
getopts_inc=inc/releng_getopts_ts.inc
else
getopts_inc=inc/releng_getopts.inc
fi
if test -e "$getopts_inc"
then
. "$getopts_inc"
if test "$RELENG_PRINTED_HELP" = 1
then
print_specific_help
exit 0
fi
else
echo >&2
echo "File not found: inc/releng_getopts.inc" >&2
echo "File not found: $getopts_inc" >&2
echo "Are we in the ./releng directory of a libisoburn SVN checkout ?" >&2
echo "(Please execute the tests from that ./releng directory.)" >&2
echo >&2
exit 2
fi
# Interpret private options
# Interpret private options, they begin after the first --.
dev=
next_is=
echo >&2
echo "args= ""$@" >&2
echo >&2
next_is=ignore
for i in "$@"
do
if test "$next_is" = "dev"
if test "$next_is" = "ignore"
then
if test "$i" = "--"
then
next_is=""
fi
elif test "$next_is" = "dev"
then
dev="$i"
next_is=""
elif test "$i" = "--outdev" -o "$i" = "--dev"
elif test "$i" = "--dev"
then
next_is="dev"
else
echo >&2
echo "Unknown test specific option: $i" >&2
print_help
print_specific_help
exit 31
fi
done