mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-21 04:31:04 +08:00
0b20a9e89f
This patch systematically renames miscellaneous tests so their outputs use a *.out name (unless the test is just running some glibc program with its conventional output file name, rather than a special program at all, as in catgets tests generating *.cat). In the case of the iconv test test-iconvconfig, output is redirected where it wasn't before. In various places the "generated" variable is updated to reflect the revised test names; in iconvdata/Makefile a typo (mmtrace-tst-loading) is also fixed. resolv/Makefile sets both "generate" (which appears unused) and "generated". Bitrot in the settings of these variables could no doubt be fixed so that "make clean" after build and testing leaves results the same as after configure (and indeed the tests-special / xtests-special variables could be used to simplify things, by removing those files automatically rather than listing them manually in these variables), and "make distclean" leaves an empty build directory, but right now it appears various files don't get deleted. I think they are liable to continue to bitrot in the absence of routine testing that these targets actually work, given that building in the source directory isn't supported and that was the main use of such makefile targets. Tested x86_64. * elf/Makefile (tests-special): Rename tests to end with .out. ($(objpfx)noload-mem): Likewise. ($(objpfx)tst-leaks1-mem): Likewise. ($(objpfx)tst-leaks1-static-mem.out): Likewise. * iconv/Makefile (xtests-special): Change test-iconvconfig to $(objpfx)test-iconvconfig.out. (test-iconvconfig): Change to $(objpfx)test-iconvconfig.out. Use set -e inside subshell and redirect output to file. * iconvdata/Makefile (generated): Rename tests to end with .out. Correct type. (tests-special): Rename tests to end with .out. ($(objpfx)mtrace-tst-loading): Likewise. * intl/Makefile (generated): Likewise. (tests-special): Likewise. ($(objpfx)mtrace-tst-gettext): Likewise. * misc/Makefile (generated): Likewise. (tests-special): Likewise. ($(objpfx)tst-error1-mem): Likewise. * nptl/Makefile (tests-special): Likewise. ($(objpfx)tst-stack3-mem): Likewise. (generated): Likewise. * posix/Makefile (generated): Likewise. (tests-special): Likewise. (xtests-special): 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)bug-ga2-mem): Likewise. ($(objpfx)bug-glob2-mem): Likewise. * resolv/Makefile (generate): Likewise. (tests-special): Likewise. (xtests-special): Likewise. (generated): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise. ($(objpfx)mtrace-tst-leaks2): Likewise. localedata: * Makefile (generated): Rename tests to end with .out. (tests-special): Likewise. ($(objpfx)mtrace-tst-leaks): Likewise.
111 lines
3.4 KiB
Makefile
111 lines
3.4 KiB
Makefile
# Copyright (C) 1994-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/>.
|
|
|
|
#
|
|
# Sub-makefile for resolv portion of the library.
|
|
#
|
|
subdir := resolv
|
|
|
|
include ../Makeconfig
|
|
|
|
headers := resolv.h \
|
|
netdb.h bits/netdb.h \
|
|
arpa/nameser.h arpa/nameser_compat.h \
|
|
sys/bitypes.h
|
|
|
|
routines := herror inet_addr inet_ntop inet_pton nsap_addr res_init \
|
|
res_hconf res_libc res-state
|
|
|
|
tests = tst-aton tst-leaks tst-inet_ntop
|
|
xtests = tst-leaks2
|
|
|
|
generate := mtrace-tst-leaks.out tst-leaks.mtrace tst-leaks2.mtrace
|
|
|
|
extra-libs := libresolv libnss_dns
|
|
ifeq ($(have-thread-library),yes)
|
|
extra-libs += libanl
|
|
routines += gai_sigqueue
|
|
endif
|
|
extra-libs-others = $(extra-libs)
|
|
libresolv-routines := gethnamaddr res_comp res_debug \
|
|
res_data res_mkquery res_query res_send \
|
|
inet_net_ntop inet_net_pton inet_neta base64 \
|
|
ns_parse ns_name ns_netint ns_ttl ns_print \
|
|
ns_samedomain ns_date
|
|
|
|
libanl-routines := gai_cancel gai_error gai_misc gai_notify gai_suspend \
|
|
getaddrinfo_a
|
|
|
|
subdir-dirs = nss_dns
|
|
vpath %.c nss_dns
|
|
|
|
libnss_dns-routines := dns-host dns-network dns-canon
|
|
libnss_dns-inhibit-o = $(filter-out .os,$(object-suffixes))
|
|
ifeq ($(build-static-nss),yes)
|
|
routines += $(libnss_dns-routines) $(libresolv-routines)
|
|
static-only-routines += $(libnss_dns-routines) $(libresolv-routines)
|
|
endif
|
|
|
|
ifeq (yesyes,$(build-shared)$(have-thread-library))
|
|
tests: $(objpfx)ga_test
|
|
endif
|
|
|
|
ifeq ($(run-built-tests),yes)
|
|
ifneq (no,$(PERL))
|
|
tests-special += $(objpfx)mtrace-tst-leaks.out
|
|
xtests-special += $(objpfx)mtrace-tst-leaks2.out
|
|
endif
|
|
endif
|
|
|
|
generated += mtrace-tst-leaks.out tst-leaks.mtrace \
|
|
mtrace-tst-leaks2.out tst-leaks2.mtrace
|
|
|
|
include ../Rules
|
|
|
|
CPPFLAGS += -Dgethostbyname=res_gethostbyname \
|
|
-Dgethostbyname2=res_gethostbyname2 \
|
|
-Dgethostbyaddr=res_gethostbyaddr \
|
|
-Dgetnetbyname=res_getnetbyname \
|
|
-Dgetnetbyaddr=res_getnetbyaddr
|
|
|
|
ifeq (yes,$(have-ssp))
|
|
CFLAGS-libresolv += -fstack-protector
|
|
endif
|
|
CFLAGS-res_hconf.c = -fexceptions
|
|
|
|
# The BIND code elicits some harmless warnings.
|
|
+cflags += -Wno-strict-prototypes -Wno-write-strings
|
|
|
|
# The DNS NSS modules needs the resolver.
|
|
$(objpfx)libnss_dns.so: $(objpfx)libresolv.so
|
|
|
|
# The asynchronous name lookup code needs the thread library.
|
|
$(objpfx)libanl.so: $(shared-thread-library)
|
|
|
|
$(objpfx)ga_test: $(objpfx)libanl.so $(shared-thread-library)
|
|
|
|
$(objpfx)tst-leaks: $(objpfx)libresolv.so
|
|
tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace
|
|
$(objpfx)mtrace-tst-leaks.out: $(objpfx)tst-leaks.out
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@; \
|
|
$(evaluate-test)
|
|
|
|
tst-leaks2-ENV = MALLOC_TRACE=$(objpfx)tst-leaks2.mtrace
|
|
$(objpfx)mtrace-tst-leaks2.out: $(objpfx)tst-leaks2.out
|
|
$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@; \
|
|
$(evaluate-test)
|