mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 11:42:21 +00:00
bin/shtests: fix SHELL=/path/to/ksh assignment argument
Passing a SHELL=/path/to/ksh assignment-argument after the bin/shtest command (as documented in 'shtest --man') made the wrapper script produce inconsistent results: it would launch and claim to test the default shell, but src/cmd/ksh93/tests/shtests would actually test the shell indicated in the argument. bin/shtests: - Scan arguments for a SHELL= (or KSH=) assignment-argument, setting $KSH (and then exporting $SHELL) based on that if found. (cherry picked from commit 1e78fbbd094dfc84989ecadf06231c6515fb7412)
This commit is contained in:
parent
ec888867fd
commit
e902633abe
1 changed files with 14 additions and 1 deletions
15
bin/shtests
15
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") \
|
||||
|
|
Loading…
Reference in a new issue