summaryrefslogtreecommitdiff
path: root/usr/src/lib/libshell/common/tests/README.tests
blob: c78d32d9b171bfbff9ffcc1f69d914760a594d67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53

#### 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.