279N/A# The contents of this file are subject to the terms of the
279N/A# Common Development and Distribution License (the "License").
279N/A# You may not use this file except in compliance with the License.
279N/A# See the License for the specific language governing permissions
279N/A# and limitations under the License.
279N/A# When distributing Covered Code, include this CDDL HEADER in each
279N/A# If applicable, add the following below this CDDL HEADER, with the
279N/A# fields enclosed by brackets "[]" replaced with your own identifying
279N/A# information: Portions Copyright [yyyy] [name of copyright owner]
279N/A# Copyright (c) 2007, 2010, Oracle
and/or its affiliates. All rights reserved.
279N/A# Run the ksh93 minimum set of tests
279N/A# This may be simply a different sort order or a bug in the test suite.
279N/A# Currently under investigation.
840N/A#
glob.sh[157] glob -- expected '<d> <dd> <de> <Beware>', got '<Beware> <d> <dd> <de>'
447N/A#
glob.sh[277] glob -- expected '<abc> <abe> <bdir> <ca> <de> <man> <Beware>', got '<abc> <abe> <bdir> <Beware> <ca> <de> <man>'
447N/A# This may be simply a different sort order or a bug in the test suite.
447N/A# Currently under investigation.
447N/A# - These tests need a working system clock, otherwise they'll bite you.
279N/A# - The current list of locales was mainly composed to cover various encodings
279N/A# and all important markets based on suggestions by Sun's i18n team.
279N/A# - More locales should be tested here (via ON_KSH_TEST_LOCALES below).
279N/A# that is getting little bit more compliciated because these locales use
279N/A# ',' as decimal delimter. The best solution may be to wait for ksh93
447N/A# being integrated into
OS/Net and then change the test sequence to
279N/A# - Due to the timing sensitivity of some of the tests, these tests should
279N/A# be run on a quiet system with no other activity.
# ON_KSH_TEST_LOCALES can be overridden via
# $ export ON_KSH_TEST_LOCALES=<value> # before $ make install #
# ON_KSH_TEST_LIST can be overridden via
# $ export ON_KSH_TEST_LIST=<value> # before $ make install #
ON_KSH_TEST_LIST = $(TESTSRC)/*.sh
# Boolean (
true/false) flag to control whether we should make test
ON_KSH_TEST_IGNORE_TESTFAILURE=false
# We must wait for other things in this subdir to finish before running
# the test suite, otherwise we may run into trouble that this activity
# may disturb the test suite run (resulting in weird "heisenbug"-like
print '# NOTE: Make sure your binaries in ROOT match your kernel!' ; \
printf "# which ksh='%s', ksh93='%s'\n" \
"$$(which ksh)" "$$(which ksh93)" ; \
if [[ "$$(isalist)" != ~(F)$(LIBSHELLMACH) ]] ; then \
"# ISA='%s' not available on this system, skipping tests...\n" \
print "# Libraries used:" ; \
LD_LIBRARY_PATH_64="$(ROOTLIB64)/" \
LD_LIBRARY_PATH_32="$(ROOTLIB)/" \
LD_LIBRARY_PATH="$(ROOTLIB64)/:$(ROOTLIB)/" \
print "# Running tests:" ; \
for test_lang in $(ON_KSH_TEST_LOCALES) ; do \
if [[ "$$(egrep "^$${test_lang}\$$" <<< "$${supported_locales}")" == "" ]] ; then \
"# Locale '%s' not supported, skipping tests...\n" \
(for test_item in $(ON_KSH_TEST_LIST) ; do \
"$${test_item}" == "$(TESTSRC)/
glob.sh" || \
"$${test_item}" == "$(TESTSRC)/
options.sh" ]] || \
$(ON_KSH_TEST_IGNORE_TESTFAILURE) && \
for mode in 'plain_script:-s' 'compiled_script:-c' ; do \
"## Running %s test: LANG='%s' script='%s', mode='%s'\n" \
"$$(basename "$${test_item}")" \
SHELL="$(SRC)
/cmd/ksh/$(LIBSHELLMACH)/ksh" \
LD_LIBRARY_PATH_64="$(ROOTLIB64)/" \
LD_LIBRARY_PATH_32="$(ROOTLIB)/" \
LD_LIBRARY_PATH="$(ROOTLIB64)/:$(ROOTLIB)/" ; \
"$${SHELL}" "$(TESTSRC)/shtests" -t "$${mode#*:}" \
LD_LIBRARY_PATH_64="$${LD_LIBRARY_PATH_64}" \
LD_LIBRARY_PATH_32="$${LD_LIBRARY_PATH_32}" \
LD_LIBRARY_PATH="$${LD_LIBRARY_PATH}" \
SHCOMP="$(ROOTBIN)/shcomp" \
) 2>&1 | while read ; do \
printf "#\t%s\n" "$${REPLY}" ; \
[[ "$${test_output}" == ~(E)test.*passed\ \[\ [[:digit:]]*\ test.*\ 0\ errors\ \] ]] || \
(print "##--------> test failed" ; exit 1) \