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