686554bff6
Various glibc build / install / test code has C locale settings that are redundant with LC_ALL=C. LC_ALL takes precedence over LANG, so anywhere that sets LC_ALL=C (explicitly, or through it being in the default environment for running tests) does not need to set LANG=C. LC_ALL=C also takes precedence over LANGUAGE, since 2001-01-02 Ulrich Drepper <drepper@redhat.com> * intl/dcigettext.c (guess_category_value): Rewrite so that LANGUAGE value is ignored if the selected locale is the C locale. * intl/tst-gettext.c: Set locale for above change. * intl/tst-translit.c: Likewise. and so settings of LANGUAGE=C are also redundant when LC_ALL=C is set. One test also had LC_ALL=C in its -ENV setting, although it's part of the default environment used for tests. This patch removes the redundant settings. It removes a suggestion in install.texi of setting LANGUAGE=C LC_ALL=C for "make install"; the Makefile.in target "install" already sets LC_ALL_C so there's no need for the user to set it (and nor should there be any need for the user to set it). If some build machine tool used by "make install" uses a version of libintl predating that 2001 change, and the user has LANGUAGE set, the removal of LANGUAGE=C from the Makefile.in "install" rule could in principle affect the user's installation. However, I don't think we need to be concerned about pre-2001 build tools. Tested x86_64. * Makefile (install): Don't set LANGUAGE. * Makefile.in (install): Likewise. * assert/Makefile (test-assert-ENV): Remove variable. (test-assert-perr-ENV): Likewise. * elf/Makefile (neededtest4-ENV): Likewise. * iconvdata/Makefile ($(inst_gconvdir)/gconv-modules) [$(cross-compiling) = no]: Don't set LANGUAGE. * io/ftwtest-sh (LANG): Remove variable. * libio/Makefile (tst-widetext-ENV): Likewise. * manual/install.texi (Running make install): Don't refer to environment settings for make install. * INSTALL: Regenerated. * nptl/tst-tls6.sh: Don't set LANG. * posix/globtest.sh (LANG): Remove variable. * string/Makefile (tester-ENV): Likewise. (inl-tester-ENV): Likewise. (noinl-tester-ENV): Likewise. * sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules) [$(cross-compiling) = no]: Don't set LANGUAGE. * timezone/Makefile (build-testdata): Use $(built-program-cmd) without explicit environment settings. localedata/ChangeLog: * tst-fmon.sh: Don't set LANGUAGE. * tst-locale.sh: Likewise.
62 lines
1.9 KiB
Bash
Executable File
62 lines
1.9 KiB
Bash
Executable File
#! /bin/sh
|
|
# Testing the implementation of strfmon(3).
|
|
# Copyright (C) 1996-2014 Free Software Foundation, Inc.
|
|
# This file is part of the GNU C Library.
|
|
# Contributed by Jochen Hein <jochen.hein@delphi.central.de>, 1997.
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
# License as published by the Free Software Foundation; either
|
|
# version 2.1 of the License, or (at your option) any later version.
|
|
|
|
# The GNU C Library 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
|
|
# Lesser General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
# License along with the GNU C Library; if not, see
|
|
# <http://www.gnu.org/licenses/>.
|
|
|
|
set -e
|
|
|
|
common_objpfx=$1
|
|
run_program_prefix_before_env=$2
|
|
run_program_env=$3
|
|
run_program_prefix_after_env=$4
|
|
test_program_prefix=$5
|
|
datafile=$6
|
|
|
|
here=`pwd`
|
|
|
|
lang=`sed -e '/^#/d' -e '/^$/d' -e '/^C /d' -e '/^tstfmon/d' -e 's/^\([^ ]*\).*/\1/' $datafile | sort | uniq`
|
|
|
|
# Generate data files.
|
|
for cns in `cd ./tst-fmon-locales && ls tstfmon_*`; do
|
|
cn=tst-fmon-locales/$cns
|
|
fn=charmaps/ISO-8859-1
|
|
${run_program_prefix_before_env} \
|
|
${run_program_env} \
|
|
I18NPATH=. \
|
|
${run_program_prefix_after_env} ${common_objpfx}locale/localedef \
|
|
--quiet -i $cn -f $fn ${common_objpfx}localedata/$cns
|
|
done
|
|
|
|
# Run the tests.
|
|
errcode=0
|
|
# There's a TAB for IFS
|
|
while IFS=" " read locale format value expect; do
|
|
case "$locale" in '#'*) continue ;; esac
|
|
if [ -n "$format" ]; then
|
|
expect=`echo "$expect" | sed 's/^\"\(.*\)\"$/\1/'`
|
|
${test_program_prefix} ${common_objpfx}localedata/tst-fmon \
|
|
"$locale" "$format" "$value" "$expect" < /dev/null ||
|
|
errcode=$?
|
|
fi
|
|
done < $datafile
|
|
|
|
exit $errcode
|
|
# Local Variables:
|
|
# mode:shell-script
|
|
# End:
|