mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
bin/shtests wrapper: export INSTALLROOT when using other ksh
When specifying another ksh to test using e.g. KSH=/bin/ksh to test the system's stock ksh, the pty command was not found because it resides in the arch/*/bin directory. The main shtests script bases its $PATH on $INSTALLROOT, but does not set INSTALLROOT itself if the shell to test is outside the installation hierarchy. Setting it would allow the pty.sh regresssion tests to run on a shell specified on the command line. bin/shtests: - Set and export INSTALLROOT to our default installation hierarchy if it wasn't already set on entry.
This commit is contained in:
parent
8c705bf3b7
commit
f811482350
1 changed files with 4 additions and 3 deletions
|
@ -27,11 +27,11 @@ mydir=$(dirname "$0") \
|
|||
&& mydir=$(CDPATH='' cd -P -- "$mydir/.." && printf '%sX' "$PWD") \
|
||||
&& mydir=${mydir%X} \
|
||||
|| exit
|
||||
myarch=$("$mydir/bin/package" host type) || exit
|
||||
|
||||
# Check if there is a ksh to test.
|
||||
case ${KSH+set} in
|
||||
( '' ) myarch=$("$mydir/bin/package" host) || exit
|
||||
KSH=$mydir/arch/$myarch/bin/ksh ;;
|
||||
( '' ) KSH=$mydir/arch/$myarch/bin/ksh ;;
|
||||
esac
|
||||
if ! test -x "$KSH" || ! test -f "$KSH"; then
|
||||
printf '%s: shell not found: %s\n' "${0##*/}" "$KSH" >&2
|
||||
|
@ -47,7 +47,8 @@ KSH=$(CDPATH='' cd -P -- "$(dirname "$KSH")" \
|
|||
# Run the test suite
|
||||
CDPATH='' cd -P -- "$mydir/src/cmd/ksh93/tests" || exit
|
||||
SHELL=$KSH
|
||||
export SHELL
|
||||
INSTALLROOT=${INSTALLROOT:-$mydir/arch/$myarch}
|
||||
export SHELL INSTALLROOT
|
||||
unset -v KSH
|
||||
printf '#### Regression-testing %s ####\n' "$SHELL"
|
||||
exec "$SHELL" shtests "$@"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue