README.tests revision 34f9b3eef6fdadbda0a846aa4d68691ac40eace5
#### ksh93 test suite
## Intro
The directory /usr/demo/ksh/tests/ contains the ksh93 test suite
which is used to verify the correct behaviour of ksh93.
The test suite is split into modules with the ending *.sh
and a frontend called "shtests" which is used to run the tests.
## Basic description:
/usr/demo/ksh/tests/shtests <options> <varname=value> <testmodule>
<options> may be:
-a execute test module one time as normal script code
and a 2nd time as compiled shell script. The env
variable SHCOMP defines the version of the shell
compiler being used (default is "${SHELL%/*}/shcomp",
however it is recommended to explicitly set SHCOMP
to /usr/bin/shcomp).
-c execute test module as compiled shell script
-s execute test module as normal shell script
-t do not print timing information
-v use VMDEBUG
<varname=value>
Sets one or more environment variables to value "value".
<testmodule>
file name of test module
## Basic usage in Solaris >= 11 and OpenSolaris/Indiana:
The tests can be executed like this:
$ export SHELL=<path-to-ksh93-executable>
$ export SHCOMP=/usr/bin/shcomp
for t in /usr/demo/ksh/tests/*.sh ; do
$SHELL /usr/demo/ksh/tests/shtests -a "$t"
done
Note that you MUST NOT use "/usr/bin/ksh93" as value for
SHELL since /usr/bin/ksh93 on Solaris is a wrapper which
selects a suitable executable in /usr/bin/<isa>/ksh93
based on the hardware capabilities defined via /usr/bin/isalist
Valid values for SHELL are:
- SHELL=/usr/bin/i86/ksh93 # 32bit i386
- SHELL=/usr/bin/amd64/ksh93 # 64bit AMD64
- SHELL=/usr/bin/sparcv7/ksh93 # 32bit SPARC
- SHELL=/usr/bin/sparcv9/ksh93 # 64bit SPARC
- SHELL=/usr/bin/s390/ksh93 # 32bit SystemZ
- SHELL=/usr/bin/s390x/ksh93 # 64bit SystemZ
# EOF.