xref: /titanic_44/usr/src/lib/libshell/common/tests/README.tests (revision 16ba0fac26f672b18447f2e17a2f91f14ed3ce40)
1
2#### ksh93 test suite
3
4## Intro
5The directory /usr/demo/ksh/tests/ contains the ksh93 test suite
6which is used to verify the correct behaviour of ksh93.
7
8The test suite is split into modules with the ending *.sh
9and a frontend called "shtests" which is used to run the tests.
10
11
12## Basic description:
13/usr/demo/ksh/tests/shtests <options> <varname=value> <testmodule>
14
15<options> may be:
16    -a execute test module one time as normal script code
17       and a 2nd time as compiled shell script. The env
18       variable SHCOMP defines the version of the shell
19       compiler being used (default is "${SHELL%/*}/shcomp",
20       however it is recommended to explicitly set SHCOMP
21       to /usr/bin/shcomp).
22    -c execute test module as compiled shell script
23    -s execute test module as normal shell script
24    -t do not print timing information
25    -v use VMDEBUG
26<varname=value>
27    Sets one or more environment variables to value "value".
28<testmodule>
29    file name of test module
30
31
32## Basic usage in Solaris >= 11 and OpenSolaris/Indiana:
33The tests can be executed like this:
34$ export SHELL=<path-to-ksh93-executable>
35$ export SHCOMP=/usr/bin/shcomp
36for t in /usr/demo/ksh/tests/*.sh ; do
37    $SHELL /usr/demo/ksh/tests/shtests -a "$t"
38done
39
40Note that you MUST NOT use "/usr/bin/ksh93" as value for
41SHELL since /usr/bin/ksh93 on Solaris is a wrapper which
42selects a suitable executable in /usr/bin/<isa>/ksh93
43based on the hardware capabilities defined via /usr/bin/isalist
44
45Valid values for SHELL are:
46- SHELL=/usr/bin/i86/ksh93      # 32bit i386
47- SHELL=/usr/bin/amd64/ksh93    # 64bit AMD64
48- SHELL=/usr/bin/sparcv7/ksh93  # 32bit SPARC
49- SHELL=/usr/bin/sparcv9/ksh93  # 64bit SPARC
50- SHELL=/usr/bin/s390/ksh93     # 32bit SystemZ
51- SHELL=/usr/bin/s390x/ksh93    # 64bit SystemZ
52
53# EOF.
54