* .gitignore: Ignore '.dirstamp' files * bootstrap.conf: Add 'non-recursive-gnulib-prefix-hack' gnulib module. Add missing 'stdalign' module. (bootstrap_post_import_hook): Use module to adjust gnulib.mk file. * configure.ac: Add 'subdir-objects' automake option, don't generate makefiles in subdirectories. Adjust path of XFAIL tests. * Makefile.am: Include 'local.mk' files, adjust for non-recursive make. * doc/Makefile.am: Rename to ... * doc/local.mk: Adjust paths. Rename SED to SEDBIN variable, to avoid overriding the default system-wide SED value which is automatically set by autotools. * lib/Makefile.am: Rename to ... * lib/local.mk: Adjust paths. * lib/.gitignore: Ignore 'stdalign.h' from gnulib module. * sed/Makefile.am: Rename to ... * sed/local.mk: Adjust paths. * testsuite/Makefile.am: Rename to ... * testsuite/local.mk: Adjust paths. * testsuite/init.cfg: Move to ... * init.cfg: ... here. Moved to avoid changing the path in init.sh, and to keep the same directory structure as coreutils. (require_en_utf8_locale_): Adjust path for get-mb-cur-max executable. (require_ja_shiftjis_locale_,require_valid_ja_shiftjis_locale_): Adjust path for test-mbrtowc executable. * m4/.gitignore: Add gnulib's non-recusive-make module. * testsuite/runtest: Adjust paths of Makefile.tests and dir variables, Skip utility program 'get-mb-cur-max' which is not a standalone test. * testsuite/Makefile.tests: Adjust path of sed exeutable. * testsuite/eval.sed, testsuite/eval.good: Adjust path of sed executable. * testsuite/cmd-R.sh, testsuite/cmd-l.sh, testsuite/colon-with-no-label.sh, testsuite/comment-n.sh, testsuite/compile-errors.sh, testsuite/compile-tests.sh, testsuite/convert-number.sh, testsuite/execute-tests.sh, testsuite/follow-symlinks-stdin.sh, testsuite/follow-symlinks.sh, testsuite/help-version.sh, testsuite/in-place-hyphen.sh, testsuite/in-place-suffix-backup.sh, testsuite/invalid-mb-seq-UMR.sh, testsuite/mb-bad-delim.sh, testsuite/mb-charclass-non-utf8.sh, testsuite/mb-match-slash.sh, testsuite/mb-y-translate.sh, testsuite/normalize-text.sh, testsuite/nulldata.sh, testsuite/panic-tests.sh, testsuite/posix-char-class.sh, testsuite/posix-mode-N.sh, testsuite/posix-mode-addr.sh, testsuite/posix-mode-bad-ref.sh, testsuite/posix-mode-s.sh, testsuite/range-overlap.sh, testsuite/recursive-escape-c.sh, testsuite/regex-errors.sh, testsuite/stdin-prog.sh, testsuite/subst-mb-incomplete.sh, testsuite/subst-options.sh, testsuite/subst-replacement.sh, testsuite/temp-file-cleanup.sh, testsuite/unbuffered.sh: Adjust paths of init.sh, sed executable.
97 lines
3.1 KiB
INI
97 lines
3.1 KiB
INI
# This file is sourced by init.sh, *before* its initialization.
|
|
|
|
# Copyright (C) 2010-2016 Free Software Foundation, Inc.
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
# This goes hand in hand with the "exec 9>&2;" in tests/Makefile.am's
|
|
# TESTS_ENVIRONMENT definition.
|
|
stderr_fileno_=9
|
|
|
|
# Skip the current test if valgrind doesn't work,
|
|
# which could happen if not installed,
|
|
# or hasn't support for the built architecture,
|
|
# or hasn't appropriate error suppressions installed etc.
|
|
require_valgrind_()
|
|
{
|
|
valgrind --error-exitcode=1 true 2>/dev/null ||
|
|
skip_ "requires a working valgrind"
|
|
}
|
|
|
|
# Call this with a list of programs under test immediately after
|
|
# sourcing init.sh.
|
|
print_ver_()
|
|
{
|
|
if test "$VERBOSE" = yes; then
|
|
local i
|
|
for i in $*; do
|
|
env $i --version
|
|
done
|
|
fi
|
|
}
|
|
|
|
# Some tests would fail without this particular locale.
|
|
# If the locale is not available, just skip the test.
|
|
require_en_utf8_locale_()
|
|
{
|
|
path_prepend_ ./testsuite
|
|
case $(get-mb-cur-max en_US.UTF-8) in
|
|
[3456]) ;;
|
|
*) skip_ 'en_US.UTF-8 locale not found' ;;
|
|
esac
|
|
}
|
|
|
|
# Some tests would fail without this particular locale.
|
|
# If the locale is not available, just skip the test.
|
|
# The exact spelling differs between operating systems
|
|
# (ja_JP.shiftjis on Ubuntu, ja_JP.sjis on Debian, ja_JP.SJIS on Mac OS X).
|
|
# If a sjift-jis locale is found the function sets shell variable
|
|
# 'LOCALE_JA_SJIS' to the locale name.
|
|
require_ja_shiftjis_locale_()
|
|
{
|
|
path_prepend_ ./testsuite
|
|
LOCALE_JA_SJIS=
|
|
for l in shiftjis sjis SJIS ; do
|
|
n=$(get-mb-cur-max ja_JP.$l) || continue
|
|
test 2 -eq "$n" || continue
|
|
LOCALE_JA_SJIS="ja_JP.$l"
|
|
break
|
|
done
|
|
test -z "$LOCALE_JA_SJIS" && skip_ 'ja_JP shift-jis locale not found'
|
|
}
|
|
|
|
# Ensure the implementation of mbrtowc can detect invalid
|
|
# multibyte shiftjis sequences. Otherwise, skip the test, to avoid
|
|
# false-alarms.
|
|
# "$1" should be the name of the SHIFT-JIS locale
|
|
# (as set by 'require_ja_shiftjis_locale_' above)
|
|
require_valid_ja_shiftjis_locale_()
|
|
{
|
|
path_prepend_ ./testsuite
|
|
local n=$(printf '\203:' | LC_ALL="$1" test-mbrtowc)
|
|
test "x$n" = "x-2,-1" || skip_ "locale '$1' is buggy"
|
|
}
|
|
|
|
# Ensure the implementation of mbrtowc can detect invalid
|
|
# multibyte eucJP sequences. Otherwise, skip the test, to avoid
|
|
# false-alarms.
|
|
# "$1" should be the name of the ja_JP.eucJP locale
|
|
# (as set in $LOCALE_JA by m4/locale-ja.m4)
|
|
require_valid_ja_eucjp_locale_()
|
|
{
|
|
path_prepend_ .
|
|
local n=$(printf '\262C' | LC_ALL="$1" test-mbrtowc)
|
|
test "x$n" = "x-2,-1" || skip_ "locale '$1' is buggy"
|
|
}
|