mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-21 01:12:26 +08:00
f0881698bf
This patch, an updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00194.html> now proposed for inclusion in glibc, extends the generation of PASS and FAIL status in .test-result files for individual tests to cover tests with their own custom makefile rules. This is just adding $(evaluate-test) calls to all such rules, since tests with multiple commands were previously split into separate tests. Note that the tests the makefiles expect to fail (posix/annexc and conformtest) currently get FAIL listed in the .test-result file, rather than XFAIL; a subsequent patch will introduce a better XFAIL mechanism. Tested x86_64. * Makefile ($(objpfx)c++-types-check.out): Use $(evaluate-test). ($(objpfx)check-local-headers.out): Likewise. ($(objpfx)begin-end-check.out): Likewise. * Makerules (check-abi-%.out): Likewise. * catgets/Makefile ($(objpfx)test1.cat): Likewise. ($(objpfx)test2.cat): Likewise. ($(objpfx)de/libc.cat): Likewise. ($(objpfx)test-gencat.out): Likewise. * conform/Makefile ($(objpfx)run-conformtest.out): Likewise. * elf/Makefile ($(objpfx)order-cmp.out): Likewise. ($(objpfx)noload-mem): Likewise. ($(objpfx)tst-pathopt.out): Likewise. ($(objpfx)tst-rtld-load-self.out): Likewise. ($(objpfx)tst-array1-cmp.out): Likewise. ($(objpfx)tst-array1-static-cmp.out): Likewise. ($(objpfx)tst-array2-cmp.out): Likewise. ($(objpfx)tst-array3-cmp.out): Likewise. ($(objpfx)tst-array4-cmp.out): Likewise. ($(objpfx)tst-array5-cmp.out): Likewise. ($(objpfx)tst-array5-static-cmp.out): Likewise. ($(objpfx)check-textrel.out): Likewise. ($(objpfx)check-execstack.out): Likewise. ($(objpfx)check-localplt.out): Likewise. ($(objpfx)order2-cmp.out): Likewise. ($(objpfx)tst-leaks1-mem): Likewise. ($(objpfx)tst-leaks1-static-mem): Likewise. ($(objpfx)tst-initorder-cmp.out): Likewise. ($(objpfx)tst-initorder2-cmp.out): Likewise. ($(objpfx)tst-unused-dep.out): Likewise. ($(objpfx)tst-unused-dep-cmp.out): Likewise. * grp/Makefile ($(objpfx)tst_fgetgrent.out): Likewise. * iconv/Makefile (test-iconvconfig): Likewise. * iconvdata/Makefile ($(objpfx)mtrace-tst-loading): Likewise. ($(objpfx)iconv-test.out): Likewise. ($(objpfx)tst-tables.out): Likewise. * intl/Makefile ($(objpfx)mtrace-tst-gettext): Likewise. ($(objpfx)tst-gettext.out): Likewise. ($(objpfx)tst-translit.out): Likewise. ($(objpfx)tst-gettext2.out): Likewise. ($(objpfx)tst-gettext4.out): Likewise. ($(objpfx)tst-gettext6.out): Likewise. * io/Makefile ($(objpfx)ftwtest.out): Likewise. * libio/Makefile ($(objpfx)test-freopen.out): Likewise. ($(objpfx)tst-fopenloc-cmp.out): Likewise. ($(objpfx)tst-fopenloc-mem.out): Likewise. * malloc/Makefile ($(objpfx)tst-mtrace.out): Likewise. * misc/Makefile ($(objpfx)tst-error1-mem): Likewise. * posix/Makefile ($(objpfx)globtest.out): Likewise. ($(objpfx)wordexp-tst.out): Likewise. ($(objpfx)annexc.out): Likewise. ($(objpfx)tst-fnmatch-mem): Likewise. ($(objpfx)bug-regex2-mem): Likewise. ($(objpfx)bug-regex14-mem): Likewise. ($(objpfx)bug-regex21-mem): Likewise. ($(objpfx)bug-regex31-mem): Likewise. ($(objpfx)tst-vfork3-mem): Likewise. ($(objpfx)tst-rxspencer-no-utf8-mem): Likewise. ($(objpfx)tst-pcre-mem): Likewise. ($(objpfx)tst-boost-mem): Likewise. ($(objpfx)tst-getconf.out): Likewise. ($(objpfx)bug-ga2-mem): Likewise. ($(objpfx)bug-glob2-mem): Likewise. * resolv/Makefile ($(objpfx)mtrace-tst-leaks): Likewise. ($(objpfx)mtrace-tst-leaks2): Likewise. * stdio-common/Makefile ($(objpfx)tst-unbputc.out): Likewise. ($(objpfx)tst-printf.out): Likewise. ($(objpfx)tst-setvbuf1.out): Likewise. ($(objpfx)tst-setvbuf1-cmp.out): Likewise. * stdlib/Makefile ($(objpfx)isomac.out): Likewise. ($(objpfx)tst-fmtmsg.out): Likewise. * string/Makefile ($(objpfx)tst-svc-cmp.out): Likewise. * sysdeps/x86/Makefile ($(objpfx)tst-xmmymm.out): Likewise. localedata: * Makefile ($(objpfx)sort-test.out): Use $(evaluate-test). ($(objpfx)tst-fmon.out): Likewise. ($(objpfx)tst-numeric.out): Likewise. ($(objpfx)tst-locale.out): Likewise. ($(objpfx)tst-rpmatch.out): Likewise. ($(objpfx)tst-trans.out): Likewise. ($(objpfx)tst-mbswcs.out): Likewise. ($(objpfx)tst-ctype.out): Likewise. ($(objpfx)tst-wctype.out): Likewise. ($(objpfx)tst-langinfo.out): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise. nptl: * Makefile ($(objpfx)tst-stack3-mem): Use $(evaluate-test). ($(objpfx)tst-tls6.out): Likewise. ($(objpfx)tst-cleanup0.out): Likewise. ($(objpfx)tst-cleanup0-cmp.out): Likewise. ($(objpfx)tst-cancel-wrappers.out): Likewise. ($(objpfx)tst-oddstacklimit.out): Likewise. nptl_db: * Makefile ($(objpfx)db-symbols.out): Use $(evaluate-test).
142 lines
4.8 KiB
Makefile
142 lines
4.8 KiB
Makefile
# Copyright (C) 1995-2014 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/>.
|
|
|
|
# Makefile for intl subdirectory: message handling code from GNU gettext.
|
|
|
|
subdir = intl
|
|
headers = libintl.h
|
|
routines = bindtextdom dcgettext dgettext gettext \
|
|
dcigettext dcngettext dngettext ngettext \
|
|
finddomain loadmsgcat localealias textdomain
|
|
aux = l10nflist explodename plural plural-exp hash-string
|
|
|
|
include ../Makeconfig
|
|
|
|
multithread-test-srcs := tst-gettext4 tst-gettext5 tst-gettext6
|
|
test-srcs := tst-gettext tst-translit tst-gettext2 tst-codeset tst-gettext3
|
|
ifeq ($(have-thread-library),yes)
|
|
test-srcs += $(multithread-test-srcs)
|
|
endif
|
|
tests = tst-ngettext
|
|
|
|
before-compile = $(objpfx)msgs.h
|
|
|
|
install-others = $(inst_msgcatdir)/locale.alias
|
|
|
|
generated = msgs.h mtrace-tst-gettext tst-gettext.mtrace
|
|
generated-dirs := domaindir localedir
|
|
|
|
ifneq (no,$(BISON))
|
|
plural.c: plural.y
|
|
$(BISON) $(BISONFLAGS) $@ $^
|
|
endif
|
|
$(objpfx)plural.o: plural.c
|
|
|
|
include ../Rules
|
|
|
|
ifeq ($(run-built-tests),yes)
|
|
ifeq (yes,$(build-shared))
|
|
ifneq ($(strip $(MSGFMT)),:)
|
|
tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \
|
|
$(objpfx)tst-codeset.out $(objpfx)tst-gettext3.out
|
|
ifeq ($(have-thread-library),yes)
|
|
tests: $(objpfx)tst-gettext4.out $(objpfx)tst-gettext5.out \
|
|
$(objpfx)tst-gettext6.out
|
|
endif
|
|
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): tstcodeset.po
|
|
$(make-target-directory)
|
|
msgfmt -o $@T $<
|
|
mv -f $@T $@
|
|
|
|
$(objpfx)mtrace-tst-gettext: $(objpfx)tst-gettext.out
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-gettext.mtrace > $@; \
|
|
$(evaluate-test)
|
|
$(objpfx)tst-gettext.out: tst-gettext.sh $(objpfx)tst-gettext
|
|
$(SHELL) $< $(common-objpfx) '$(test-program-prefix)' \
|
|
$(common-objpfx)intl/ $(objpfx)tst-gettext.mtrace; \
|
|
$(evaluate-test)
|
|
$(objpfx)tst-translit.out: tst-translit.sh $(objpfx)tst-translit
|
|
$(SHELL) $< $(common-objpfx) '$(test-program-prefix)' \
|
|
$(common-objpfx)intl/; \
|
|
$(evaluate-test)
|
|
$(objpfx)tst-gettext2.out: tst-gettext2.sh $(objpfx)tst-gettext2
|
|
$(SHELL) $< $(common-objpfx) '$(test-program-prefix)' \
|
|
$(common-objpfx)intl/; \
|
|
$(evaluate-test)
|
|
$(objpfx)tst-gettext4.out: tst-gettext4.sh $(objpfx)tst-gettext4
|
|
$(SHELL) $< $(common-objpfx) '$(test-program-prefix)' $(common-objpfx)intl/; \
|
|
$(evaluate-test)
|
|
$(objpfx)tst-gettext6.out: tst-gettext6.sh $(objpfx)tst-gettext6
|
|
$(SHELL) $< $(common-objpfx) '$(test-program-prefix)' $(common-objpfx)intl/; \
|
|
$(evaluate-test)
|
|
|
|
$(objpfx)tst-codeset.out: $(codeset_mo)
|
|
$(objpfx)tst-gettext3.out: $(codeset_mo)
|
|
$(objpfx)tst-gettext5.out: $(codeset_mo)
|
|
endif
|
|
endif
|
|
|
|
$(objpfx)msgs.h: po2test.awk ../po/de.po
|
|
$(make-target-directory)
|
|
LC_ALL=C $(AWK) -f $^ > $@
|
|
|
|
CFLAGS-tst-gettext.c = -DTESTSTRS_H=\"$(objpfx)msgs.h\"
|
|
CFLAGS-tst-translit.c = -DOBJPFX=\"$(objpfx)\"
|
|
CFLAGS-tst-gettext2.c = -DOBJPFX=\"$(objpfx)\"
|
|
CFLAGS-tst-codeset.c = -DOBJPFX=\"$(objpfx)\"
|
|
CFLAGS-tst-gettext3.c = -DOBJPFX=\"$(objpfx)\"
|
|
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)
|
|
else
|
|
$(addprefix $(objpfx),$(multithread-test-srcs)): $(static-thread-library)
|
|
endif
|
|
endif
|
|
|
|
$(objpfx)tst-translit.out: $(objpfx)tst-gettext.out
|
|
$(objpfx)tst-gettext2.out: $(objpfx)tst-gettext.out
|
|
$(objpfx)tst-codeset.out: $(objpfx)tst-gettext.out
|
|
$(objpfx)tst-gettext3.out: $(objpfx)tst-gettext.out
|
|
$(objpfx)tst-gettext4.out: $(objpfx)tst-gettext.out
|
|
$(objpfx)tst-gettext5.out: $(objpfx)tst-gettext.out
|
|
$(objpfx)tst-gettext6.out: $(objpfx)tst-gettext.out
|
|
|
|
CPPFLAGS += -D'LOCALEDIR="$(msgcatdir)"' \
|
|
-D'LOCALE_ALIAS_PATH="$(msgcatdir)"'
|
|
BISONFLAGS = --yacc --name-prefix=__gettext --output
|
|
|
|
$(inst_msgcatdir)/locale.alias: locale.alias $(+force)
|
|
$(do-install)
|