From f214606a0e0ae0f5474b00a9675dacda77d3bf27 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Thu, 6 Mar 2014 22:35:33 +0000 Subject: Enumerate tests with special rules in tests-special variable. This patch is a revised and updated version of . 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 , and a discussion in 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. 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 . * 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. --- intl/Makefile | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'intl/Makefile') diff --git a/intl/Makefile b/intl/Makefile index 61ba07f..5676954 100644 --- a/intl/Makefile +++ b/intl/Makefile @@ -47,22 +47,27 @@ plural.c: plural.y 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 +tests-special += $(objpfx)tst-translit.out $(objpfx)tst-gettext.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 +tests-special += $(objpfx)tst-gettext4.out $(objpfx)tst-gettext5.out \ + $(objpfx)tst-gettext6.out endif ifneq (no,$(PERL)) -tests: $(objpfx)mtrace-tst-gettext +tests-special += $(objpfx)mtrace-tst-gettext +endif +endif endif endif +include ../Rules + +ifeq ($(run-built-tests),yes) +ifeq (yes,$(build-shared)) # 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 -- cgit v1.1