summaryrefslogtreecommitdiff
path: root/intl
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2012-08-17 14:32:19 -0600
committerJeff Law <law@redhat.com>2012-08-17 14:32:19 -0600
commitd1f0938405168df23e24f3446480f96b62e523b5 (patch)
tree4c975959313b1e736b686b0e1950fe5031f5f7ef /intl
parentc31fdb83d239de6f5196c6b676e9200a1f7cefe6 (diff)
2012-08-17 Jeff Law <law@redhat.com>
* intl/Makefile (codeset_mo): New variable. ($(codeset_mo)): New target. (tst-codeset.out): Depend on that. Remove explicit rule. (tst-gettext3.out, tst-gettext5.out): Likewise. (LOCPATH-ENV, tst-codeset-ENV): New variables. (tst-gettext3-ENV, tst-gettext5-ENV): Likewise. * intl/tst-codeset.sh: Remove. * intl/tst-gettext3.sh: Likewise. * intl/tst-gettext5.sh: Likewise.
Diffstat (limited to 'intl')
-rw-r--r--intl/Makefile25
-rw-r--r--intl/tst-codeset.sh42
-rw-r--r--intl/tst-gettext3.sh43
-rwxr-xr-xintl/tst-gettext5.sh42
4 files changed, 19 insertions, 133 deletions
diff --git a/intl/Makefile b/intl/Makefile
index e95f519822..d63ffe4fc0 100644
--- a/intl/Makefile
+++ b/intl/Makefile
@@ -61,6 +61,16 @@ ifneq (no,$(PERL))
tests: $(objpfx)mtrace-tst-gettext
endif
endif
+
+# Multiple tests use this data. Create it once to avoid racing and
+# spurious test failures.
+codeset_mo = $(objpfx)domaindir/de_DE/LC_MESSAGES/codeset.mo
+
+$(codeset_mo):
+ $(make-target-directory)
+ msgfmt -o $@T tstcodeset.po
+ mv -f $@T $@
+
$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
$(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@
$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
@@ -70,16 +80,14 @@ $(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
$(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
$(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
-$(objpfx)tst-codeset.out: tst-codeset.sh $(objpfx)tst-codeset
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
-$(objpfx)tst-gettext3.out: tst-gettext3.sh $(objpfx)tst-gettext3
- $(SHELL) -e $< $(common-objpfx) $(common-objpfx)intl/
$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
-$(objpfx)tst-gettext5.out: tst-gettext5.sh $(objpfx)tst-gettext5
- $(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
$(SHELL) -e $< $(common-objpfx) '$(run-program-prefix)' $(common-objpfx)intl/
+
+$(objpfx)tst-codeset.out: $(codeset_mo)
+$(objpfx)tst-gettext3.out: $(codeset_mo)
+$(objpfx)tst-gettext5.out: $(codeset_mo)
endif
endif
@@ -96,6 +104,11 @@ CFLAGS-tst-gettext4.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext5.c = -DOBJPFX=\"$(objpfx)\"
CFLAGS-tst-gettext6.c = -DOBJPFX=\"$(objpfx)\"
+LOCPATH-ENV = LOCPATH=$(common-objpfx)localedata
+tst-codeset-ENV = $(LOCPATH-ENV)
+tst-gettext3-ENV = $(LOCPATH-ENV)
+tst-gettext5-ENV = $(LOCPATH-ENV)
+
ifeq ($(have-thread-library),yes)
ifeq (yes,$(build-shared))
$(addprefix $(objpfx),$(multithread-test-srcs)): $(shared-thread-library)
diff --git a/intl/tst-codeset.sh b/intl/tst-codeset.sh
deleted file mode 100644
index 1584490aeb..0000000000
--- a/intl/tst-codeset.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# Test of bind_textdomain_codeset.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
-#
-
-# 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/>.
-
-common_objpfx=$1
-objpfx=$2
-
-LC_ALL=C
-export LC_ALL
-
-# Generate the test data.
-msgfmt -o ${objpfx}codeset.mo.$$ tstcodeset.po || exit
-# Create the domain directories.
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
-# Populate them.
-mv -f ${objpfx}codeset.mo.$$ ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo
-
-GCONV_PATH=${common_objpfx}iconvdata
-export GCONV_PATH
-LOCPATH=${common_objpfx}localedata
-export LOCPATH
-
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
-${objpfx}tst-codeset > ${objpfx}tst-codeset.out
-
-exit $?
diff --git a/intl/tst-gettext3.sh b/intl/tst-gettext3.sh
deleted file mode 100644
index 032379c060..0000000000
--- a/intl/tst-gettext3.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#! /bin/sh
-# Test that the gettext() results come out in the correct encoding for
-# locales that differ only in their encoding.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
-#
-
-# 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/>.
-
-common_objpfx=$1
-objpfx=$2
-
-LC_ALL=C
-export LC_ALL
-
-# Generate the test data.
-msgfmt -o ${objpfx}codeset.mo.$$ tstcodeset.po || exit
-# Create the domain directories.
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
-# Populate them.
-mv -f ${objpfx}codeset.mo.$$ ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo
-
-GCONV_PATH=${common_objpfx}iconvdata
-export GCONV_PATH
-LOCPATH=${common_objpfx}localedata
-export LOCPATH
-
-${common_objpfx}elf/ld.so --library-path $common_objpfx \
-${objpfx}tst-gettext3 > ${objpfx}tst-gettext3.out
-
-exit $?
diff --git a/intl/tst-gettext5.sh b/intl/tst-gettext5.sh
deleted file mode 100755
index a563b43f42..0000000000
--- a/intl/tst-gettext5.sh
+++ /dev/null
@@ -1,42 +0,0 @@
-#! /bin/sh
-# Test that gettext() in multithreaded applications works correctly if
-# different threads operate in different locales referring to the same
-# catalog file but with different encodings.
-# Copyright (C) 2001, 2002, 2005 Free Software Foundation, Inc.
-# This file is part of the GNU C Library.
-#
-
-# 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/>.
-
-common_objpfx=$1
-run_program_prefix=$2
-objpfx=$3
-
-LC_ALL=C
-export LC_ALL
-
-# Create the domain directories.
-mkdir -p ${objpfx}domaindir/de_DE/LC_MESSAGES
-# Populate them.
-msgfmt -o ${objpfx}domaindir/de_DE/LC_MESSAGES/codeset.mo tstcodeset.po
-
-GCONV_PATH=${common_objpfx}iconvdata
-export GCONV_PATH
-LOCPATH=${common_objpfx}localedata
-export LOCPATH
-
-${run_program_prefix} ${objpfx}tst-gettext5 > ${objpfx}tst-gettext5.out
-
-exit $?