mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-27 15:30:07 +00:00
6f99f280b0
In <https://sourceware.org/ml/libc-alpha/2014-01/msg00198.html> I raised the question of counting miscellaneous dependencies of tests, built on the host rather than the build system, as tests, so that when test failures don't stop "make check" neither do those other builds on the host, so that a flaky host doesn't stop "make check" from producing a complete summary of test results. Brooks supported that idea in <https://sourceware.org/ml/libc-alpha/2014-02/msg00301.html>. This patch implements that change for all the examples I could find: one message catalog in catgets/, locales in localedata/ and timezone files in timezone/. Tested x86_64. * catgets/Makefile (tests-special): Add $(objpfx)sample.SJIS.cat. ($(objpfx)sample.SJIS.cat): Use $(evaluate-test). * timezone/Makefile (testdata): Move definition above include of Rules. (test-zones): New variable. (tests-special): Add zone files. (build-testdata): Use $(evaluate-test). localedata/ChangeLog: * Makefile (LOCALES): Move definition above include of Rules. (LOCALE_SRCS): Likewise. (CHARMAPS): Likewise. (CTYPE_FILES): Likewise. (tests-special): Add locale files. ($(addprefix $(objpfx),$(CTYPE_FILES))): Use $(evaluate-test).
128 lines
4.1 KiB
Makefile
128 lines
4.1 KiB
Makefile
# Copyright (C) 1998-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 timezone information
|
|
#
|
|
subdir := timezone
|
|
|
|
include ../Makeconfig
|
|
|
|
extra-objs := scheck.o ialloc.o
|
|
|
|
others := zdump zic
|
|
tests := test-tz tst-timezone
|
|
|
|
# pacificnew doesn't compile; if it is to be used, it should be included in
|
|
# northamerica.
|
|
tzbases := africa antarctica asia australasia europe northamerica \
|
|
southamerica etcetera factory \
|
|
solar87 solar88 solar89
|
|
tzlinks := backward systemv
|
|
tzfiles := $(tzbases) $(tzlinks)
|
|
|
|
generated += $(addprefix z.,$(tzfiles))
|
|
install-sbin := zic zdump
|
|
|
|
generated-dirs += testdata
|
|
|
|
CPPFLAGS-zic = -DNOT_IN_libc
|
|
|
|
install-bin-script = tzselect
|
|
generated += tzselect
|
|
|
|
testdata = $(objpfx)testdata
|
|
|
|
# List zones generated by separate commands running zic on the host.
|
|
# Each such zic run counts as a separate test.
|
|
test-zones := America/New_York Etc/UTC UTC Europe/Berlin \
|
|
Australia/Melbourne America/Sao_Paulo Asia/Tokyo
|
|
tests-special += $(addprefix $(testdata)/, $(test-zones))
|
|
|
|
include ../Rules
|
|
|
|
|
|
$(objpfx)zic: $(objpfx)scheck.o $(objpfx)ialloc.o
|
|
|
|
$(objpfx)zic.o $(objpfx)zdump.o: $(objpfx)version.h
|
|
|
|
$(objpfx)version.h: $(common-objpfx)config.make
|
|
echo 'static char const TZVERSION[]="$(version)";' \
|
|
> $@.new
|
|
mv -f $@.new $@
|
|
|
|
tz-cflags = -DTZDIR='"$(zonedir)"' \
|
|
-DTZDEFAULT='"$(localtime-file)"' \
|
|
-DTZDEFRULES='"$(posixrules-file)"' \
|
|
-DTM_GMTOFF=tm_gmtoff -DTM_ZONE=tm_zone
|
|
|
|
CFLAGS-zdump.c = -fwrapv -Wno-strict-prototypes -DNOID $(tz-cflags) \
|
|
-DHAVE_GETTEXT
|
|
CFLAGS-zic.c = -Wno-strict-prototypes -DNOID $(tz-cflags) -DHAVE_GETTEXT
|
|
CFLAGS-ialloc.c = -Wno-strict-prototypes -DNOID -DHAVE_GETTEXT
|
|
CFLAGS-scheck.c = -Wno-strict-prototypes -DNOID -DHAVE_GETTEXT
|
|
|
|
# We have to make sure the data for testing the tz functions is available.
|
|
# Don't add leapseconds here since test-tz made checks that work only without
|
|
# leapseconds.
|
|
define build-testdata
|
|
GCONV_PATH=${common-objpfx}iconvdata LANGUAGE=C LC_ALL=C \
|
|
$(built-program-cmd) -d $(testdata) -y ./yearistype $<; \
|
|
$(evaluate-test)
|
|
endef
|
|
|
|
$(objpfx)test-tz.out: $(addprefix $(testdata)/, America/New_York Etc/UTC UTC)
|
|
$(objpfx)tst-timezone.out: $(addprefix $(testdata)/, \
|
|
Europe/Berlin Universal \
|
|
Australia/Melbourne \
|
|
America/Sao_Paulo Asia/Tokyo \
|
|
Europe/London)
|
|
|
|
test-tz-ENV = TZDIR=$(testdata)
|
|
tst-timezone-ENV = TZDIR=$(testdata)
|
|
|
|
# Note this must come second in the deps list for $(built-program-cmd) to work.
|
|
zic-deps = $(objpfx)zic $(leapseconds) yearistype
|
|
|
|
$(testdata)/America/New_York: northamerica $(zic-deps)
|
|
$(build-testdata)
|
|
$(testdata)/Etc/UTC: etcetera $(zic-deps)
|
|
$(build-testdata)
|
|
# Use a pattern rule to indicate the command produces both targets at once.
|
|
# Two separate targets built separately can collide if in parallel.
|
|
%/UTC %/Universal: simplebackw $(zic-deps) %/Etc/UTC
|
|
$(build-testdata)
|
|
$(testdata)/%/Berlin $(testdata)/%/London: europe $(zic-deps)
|
|
$(build-testdata)
|
|
$(testdata)/Australia/Melbourne: australasia $(zic-deps)
|
|
$(build-testdata)
|
|
$(testdata)/America/Sao_Paulo: southamerica $(zic-deps)
|
|
$(build-testdata)
|
|
$(testdata)/Asia/Tokyo: asia $(zic-deps)
|
|
$(build-testdata)
|
|
|
|
|
|
$(objpfx)tzselect: tzselect.ksh $(common-objpfx)config.make
|
|
sed -e 's|/bin/bash|$(BASH)|' \
|
|
-e '/TZDIR=/s|\$$(pwd)|$(zonedir)|' \
|
|
-e '/TZVERSION=/s|see_Makefile|"$(version)"|' \
|
|
-e '/PKGVERSION=/s|=.*|="$(PKGVERSION)"|' \
|
|
-e '/REPORT_BUGS_TO=/s|=.*|="$(REPORT_BUGS_TO)"|' \
|
|
< $< > $@.new
|
|
chmod 555 $@.new
|
|
mv -f $@.new $@
|