runtest: Let the test program handle the lack of a test name.
This commit is contained in:
parent
634052e4d8
commit
443bfc99ad
|
@ -26,7 +26,7 @@ usage()
|
||||||
{
|
{
|
||||||
cat >&2 <<EOF
|
cat >&2 <<EOF
|
||||||
|
|
||||||
Usage: $0 [options] input_file
|
Usage: $0 [options] [input_file]
|
||||||
|
|
||||||
input_file: the source code for the test program
|
input_file: the source code for the test program
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ platform=$WINETEST_PLATFORM
|
||||||
WINETEST_DEBUG=${WINETEST_DEBUG:-1}
|
WINETEST_DEBUG=${WINETEST_DEBUG:-1}
|
||||||
|
|
||||||
# parse command-line options
|
# parse command-line options
|
||||||
while [ "$#" != 0 ]; do
|
while [ "$#" -gt 1 ]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-h)
|
-h)
|
||||||
usage
|
usage
|
||||||
|
@ -79,16 +79,10 @@ while [ "$#" != 0 ]; do
|
||||||
--)
|
--)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
*)
|
|
||||||
infile="$1"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
# we must have found an input file
|
|
||||||
if [ ! -f "$infile" ]; then usage; fi
|
|
||||||
|
|
||||||
if [ -z "$program" ]; then
|
if [ -z "$program" ]; then
|
||||||
# try to autodetect the test program name based on the working directory
|
# try to autodetect the test program name based on the working directory
|
||||||
working_path=`pwd`
|
working_path=`pwd`
|
||||||
|
@ -139,4 +133,4 @@ export WINETEST_PLATFORM WINETEST_DEBUG
|
||||||
# WINETEST_WRAPPER=valgrind
|
# WINETEST_WRAPPER=valgrind
|
||||||
# would run the tests under valgrind to look for memory errors.
|
# would run the tests under valgrind to look for memory errors.
|
||||||
|
|
||||||
exec $WINETEST_WRAPPER "$topobjdir/wine" "$program" "$infile" "$@"
|
exec $WINETEST_WRAPPER "$topobjdir/wine" "$program" "$@"
|
||||||
|
|
Loading…
Reference in New Issue