diff --git a/bin/shtests b/bin/shtests index 713102998..03bf8ab6b 100755 --- a/bin/shtests +++ b/bin/shtests @@ -7,7 +7,20 @@ # Brief help: bin/shtests --help # # By default, this runs your compiled arch/*/bin/ksh. -# To use another ksh, run: KSH=path/to/ksh bin/shtests +# +# Note: The test suite actually uses $SHELL to indicate the shell to test. But +# we cannot use the $SHELL environment value on entry to this wrapper script, +# as that is already used for the user's default login shell on most systems. + +# Process and remove any assignment-argument indicating the shell to test +for arg do + case $arg in + ( SHELL=* | KSH=* ) + KSH=${arg#*=} ;; + ( * ) set -- "$@" "$1" ;; + esac + shift +done # Find root dir of ksh source mydir=$(dirname "$0") \