mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-24 22:10:13 +00:00
f214606a0e
This patch is a revised and updated version of <https://sourceware.org/ml/libc-alpha/2014-01/msg00196.html>. In order to generate overall summaries of the results of all tests in the glibc testsuite, we need to identify and concatenate the files with the results of individual tests. Tomas Dohnalek's patch used $(common-objpfx)*/*.test-result for this. However, the normal glibc approach is explicit enumeration of the expected set of files with a given property, rather than all files matching some pattern like that. Furthermore, we would like to be able to mark tests as UNRESOLVED if the file with their results is for some reason missing, and in future we would like to be able to mark tests as UNSUPPORTED if they are disabled for a particular configuration (rather than simply having them missing from the list of tests as at present). Such handling of tests that were not run or did not record results requires an explicit enumeration of tests. For the tests following the default makefile rules, $(tests) (and $(xtests)) provides such an enumeration. Others, however, are added directly as dependencies of the "tests" and "xtests" makefile targets. This patch changes the makefiles to put them in variables tests-special and xtests-special, with appropriate dependencies on the tests listed there then being added centrally. Those variables are used in Rules and so need to be set before Rules is included in a subdirectory makefile, which is often earlier in the makefile than the dependencies were present before. We previously discussed the question of where to include Rules; see the question at <https://sourceware.org/ml/libc-alpha/2012-11/msg00798.html>, and a discussion in <https://sourceware.org/ml/libc-alpha/2013-01/msg00337.html> of why Rules is included early rather than late in subdirectory makefiles. It was necessary to avoid an indirection through the check-abi target and get the check-abi-* targets for individual libraries into the tests-special variable. The intl/ test $(objpfx)tst-gettext.out, previously built only because of dependencies from other tests, was also added to tests-special for the same reason. The entries in tests-special are the full makefile targets, complete with $(objpfx) and .out. If a future change causes tests to be named consistently with a .out suffix, this can be changed to include just the path relative to $(objpfx), without .out. Tested x86_64, including that the same set of files is generated in the build directory by a build and testsuite run both before and after the patch (except for changes to the elf/tst-null-argv.debug.out.<number> file name), and a build with run-built-tests=no to verify there aren't any more obvious instances of the issue Marcus Shawcroft reported with a previous version in <https://sourceware.org/ml/libc-alpha/2014-01/msg00462.html>. * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (tests): Depend on $(tests-special). * Makerules (check-abi-list): New variable. (check-abi): Depend on $(check-abi-list). [$(subdir) = elf] (tests-special): Add $(objpfx)check-abi-libc.out. [$(build-shared) = yes && subdir] (tests-special): Add $(check-abi-list). [$(build-shared) = yes && subdir] (tests): Do not depend on check-abi. * Rules (tests): Depend on $(tests-special). (xtests): Depend on $(xtests-special). * catgets/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * conform/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * elf/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * grp/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * iconv/Makefile (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * iconvdata/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * intl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. Also add $(objpfx)tst-gettext.out. * io/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * libio/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * malloc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * misc/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * nptl_db/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * posix/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * resolv/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (xtests): Change dependencies to .... (xtests-special): ... additions to this variable. * stdio-common/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. (do-tst-unbputc): Remove target. (do-tst-printf): Likewise. * stdlib/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * string/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. * sysdeps/x86/Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable. localedata: * Makefile (tests): Change dependencies to .... (tests-special): ... additions to this variable.
87 lines
3.2 KiB
Makefile
87 lines
3.2 KiB
Makefile
# Copyright (C) 1991-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 string portion of library.
|
|
#
|
|
subdir := string
|
|
|
|
include ../Makeconfig
|
|
|
|
headers := string.h strings.h memory.h endian.h bits/endian.h \
|
|
argz.h envz.h byteswap.h bits/byteswap.h bits/byteswap-16.h \
|
|
bits/string.h bits/string2.h bits/string3.h
|
|
|
|
routines := strcat strchr strcmp strcoll strcpy strcspn \
|
|
strverscmp strdup strndup \
|
|
strerror _strerror strlen strnlen \
|
|
strncat strncmp strncpy \
|
|
strrchr strpbrk strsignal strspn strstr strtok \
|
|
strtok_r strxfrm memchr memcmp memmove memset \
|
|
mempcpy bcopy bzero ffs ffsll stpcpy stpncpy \
|
|
strcasecmp strncase strcasecmp_l strncase_l \
|
|
memccpy memcpy wordcopy strsep strcasestr \
|
|
swab strfry memfrob memmem rawmemchr strchrnul \
|
|
$(addprefix argz-,append count create ctsep next \
|
|
delete extract insert stringify \
|
|
addsep replace) \
|
|
envz basename \
|
|
strcoll_l strxfrm_l string-inlines memrchr \
|
|
xpg-strerror strerror_l
|
|
|
|
strop-tests := memchr memcmp memcpy memmove mempcpy memset memccpy \
|
|
stpcpy stpncpy strcat strchr strcmp strcpy strcspn \
|
|
strlen strncmp strncpy strpbrk strrchr strspn memmem \
|
|
strstr strcasestr strnlen strcasecmp strncasecmp \
|
|
strncat rawmemchr strchrnul bcopy bzero memrchr
|
|
tests := tester inl-tester noinl-tester testcopy test-ffs \
|
|
tst-strlen stratcliff tst-svc tst-inlcall \
|
|
bug-strncat1 bug-strspn1 bug-strpbrk1 tst-bswap \
|
|
tst-strtok tst-strxfrm bug-strcoll1 tst-strfry \
|
|
bug-strtok1 $(addprefix test-,$(strop-tests)) \
|
|
bug-envz1 tst-strxfrm2 tst-endian tst-svc2 \
|
|
tst-strtok_r
|
|
|
|
xtests = tst-strcoll-overflow
|
|
|
|
ifeq ($(run-built-tests),yes)
|
|
tests-special += $(objpfx)tst-svc-cmp.out
|
|
endif
|
|
|
|
include ../Rules
|
|
|
|
tester-ENV = LANGUAGE=C
|
|
inl-tester-ENV = LANGUAGE=C
|
|
noinl-tester-ENV = LANGUAGE=C
|
|
tst-strxfrm-ENV = LOCPATH=$(common-objpfx)localedata
|
|
tst-strxfrm2-ENV = LOCPATH=$(common-objpfx)localedata
|
|
bug-strcoll1-ENV = LOCPATH=$(common-objpfx)localedata
|
|
test-strcasecmp-ENV = LOCPATH=$(common-objpfx)localedata
|
|
test-strncasecmp-ENV = LOCPATH=$(common-objpfx)localedata
|
|
CFLAGS-inl-tester.c = -fno-builtin
|
|
CFLAGS-noinl-tester.c = -fno-builtin
|
|
CFLAGS-tst-strlen.c = -fno-builtin
|
|
CFLAGS-stratcliff.c = -fno-builtin
|
|
CFLAGS-test-ffs.c = -fno-builtin
|
|
CFLAGS-tst-inlcall.c = -fno-builtin
|
|
|
|
ifeq ($(run-built-tests),yes)
|
|
$(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
|
|
cmp $^ > $@; \
|
|
$(evaluate-test)
|
|
endif
|