diff options
author | Joseph Myers <joseph@codesourcery.com> | 2012-10-24 00:08:46 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2012-10-24 00:08:46 +0000 |
commit | 03ac099f6bc9157cdec50db10944e1d99ff07aa1 (patch) | |
tree | 9d818c011b71b40675d7de9779f1a4751fc5541c | |
parent | ebfd1bbd04fcc82c34d6f46d942ab763a60ede03 (diff) | |
download | glibc-03ac099f6bc9157cdec50db10944e1d99ff07aa1.zip glibc-03ac099f6bc9157cdec50db10944e1d99ff07aa1.tar.gz glibc-03ac099f6bc9157cdec50db10944e1d99ff07aa1.tar.bz2 |
Define and use $(run-built-tests).
-rw-r--r-- | ChangeLog | 20 | ||||
-rw-r--r-- | Makeconfig | 9 | ||||
-rw-r--r-- | Rules | 2 | ||||
-rw-r--r-- | catgets/Makefile | 2 | ||||
-rw-r--r-- | elf/Makefile | 6 | ||||
-rw-r--r-- | grp/Makefile | 2 | ||||
-rw-r--r-- | iconv/Makefile | 2 | ||||
-rw-r--r-- | iconvdata/Makefile | 2 | ||||
-rw-r--r-- | intl/Makefile | 2 | ||||
-rw-r--r-- | io/Makefile | 2 | ||||
-rw-r--r-- | libio/Makefile | 2 | ||||
-rw-r--r-- | localedata/ChangeLog | 5 | ||||
-rw-r--r-- | localedata/Makefile | 4 | ||||
-rw-r--r-- | malloc/Makefile | 2 | ||||
-rw-r--r-- | misc/Makefile | 2 | ||||
-rw-r--r-- | nptl/ChangeLog | 5 | ||||
-rw-r--r-- | nptl/Makefile | 6 | ||||
-rw-r--r-- | posix/Makefile | 4 | ||||
-rw-r--r-- | resolv/Makefile | 4 | ||||
-rw-r--r-- | stdio-common/Makefile | 2 | ||||
-rw-r--r-- | stdlib/Makefile | 2 | ||||
-rw-r--r-- | string/Makefile | 2 |
22 files changed, 64 insertions, 25 deletions
@@ -1,5 +1,25 @@ 2012-10-23 Joseph Myers <joseph@codesourcery.com> + * Makeconfig (run-built-tests): New variable. + * Rules [$(cross-compiling) = yes]: Change condition to + [$(run-built-tests) = no]. + * catgets/Makefile [$(cross-compiling) != yes]: Change condition + to [$(run-built-tests) = yes]. + * elf/Makefile [$(cross-compiling) = no]: Likewise + * grp/Makefile [$(cross-compiling) = no]: Likewise. + * iconv/Makefile [$(cross-compiling) != yes]: Likewise. + * iconvdata/Makefile [$(cross-compiling) = no]: Likewise. + * intl/Makefile [$(cross-compiling) = no]: Likewise. + * io/Makefile [$(cross-compiling) = no]: Likewise. + * libio/Makefile [$(cross-compiling) = no]: Likewise. + * malloc/Makefile [$(cross-compiling) = no]: Likewise. + * misc/Makefile [$(cross-compiling) = no]: Likewise. + * posix/Makefile [$(cross-compiling) = no]: Likewise. + * resolv/Makefile [$(cross-compiling) = no]: Likewise. + * stdio-common/Makefile [$(cross-compiling) = no]: Likewise. + * stdlib/Makefile [$(cross-compiling) = no]: Likewise. + * string/Makefile [$(cross-compiling) = no]: Likewise. + * posix/Makefile ($(objpfx)globtest.out): Pass $(run-program-prefix) to globtest.sh, not $(elf-objpfx) and $(rtld-installed-name). @@ -564,6 +564,15 @@ endif csu-objpfx = $(common-objpfx)csu/ elf-objpfx = $(common-objpfx)elf/ +# Whether to run test programs built for the library's host system. +ifndef run-built-tests +ifeq (yes,$(cross-compiling)) +run-built-tests = no +else +run-built-tests = yes +endif +endif + # How to run a program we just linked with our library. # The program binary is assumed to be $(word 2,$^). built-program-file = $(dir $(word 2,$^))$(notdir $(word 2,$^)) @@ -94,7 +94,7 @@ others: $(addprefix $(objpfx),$(others) $(sysdep-others) $(extra-objs)) else others: $(addprefix $(objpfx),$(extra-objs)) endif -ifeq ($(cross-compiling),yes) +ifeq ($(run-built-tests),no) tests: $(addprefix $(objpfx),$(tests) $(test-srcs)) xtests: tests else diff --git a/catgets/Makefile b/catgets/Makefile index ec8fe1e..bbd438a 100644 --- a/catgets/Makefile +++ b/catgets/Makefile @@ -50,7 +50,7 @@ generated-dirs = de tst-catgets-ENV = NLSPATH="$(objpfx)%l/%N.cat" LANG=de -ifneq ($(cross-compiling),yes) +ifeq ($(run-built-tests),yes) tests: $(objpfx)de/libc.cat $(objpfx)test1.cat $(objpfx)test2.cat \ $(objpfx)test-gencat.out # This test just checks whether the program produces any error or not. diff --git a/elf/Makefile b/elf/Makefile index c8ae77d..4f092ab 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -161,7 +161,7 @@ tests += tst-audit6 tst-audit7 endif endif endif -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-leaks1-mem $(objpfx)tst-leaks1-static-mem \ $(objpfx)noload-mem endif @@ -438,7 +438,7 @@ test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(strip $(modules-names)))) generated += $(addsuffix .so,$(strip $(modules-names))) ifeq (yes,$(build-shared)) -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-pathopt.out $(objpfx)tst-rtld-load-self.out endif endif @@ -1174,7 +1174,7 @@ $(objpfx)tst-relsort1mod2.so: $(libm) $(objpfx)tst-relsort1.out: $(objpfx)tst-relsort1mod1.so \ $(objpfx)tst-relsort1mod2.so -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-unused-dep.out endif diff --git a/grp/Makefile b/grp/Makefile index 1988cbf..99ea3a2 100644 --- a/grp/Makefile +++ b/grp/Makefile @@ -50,7 +50,7 @@ CFLAGS-getgrgid.c = -fexceptions endif -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) # tst_fgetgrent currently only works with shared libraries ifeq (yes,$(build-shared)) tests: $(objpfx)tst_fgetgrent.out diff --git a/iconv/Makefile b/iconv/Makefile index 6d77911..4724d4f 100644 --- a/iconv/Makefile +++ b/iconv/Makefile @@ -69,7 +69,7 @@ $(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force) $(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o) $(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o) -ifneq ($(cross-compiling),yes) +ifeq ($(run-built-tests),yes) xtests: test-iconvconfig endif diff --git a/iconvdata/Makefile b/iconvdata/Makefile index cf6cf70..89f0dcd 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -267,7 +267,7 @@ endif # build-shared = yes include ../Rules -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared)) tests: $(objpfx)iconv-test.out $(objpfx)tst-tables.out ifneq (no,$(PERL)) diff --git a/intl/Makefile b/intl/Makefile index 5bf6606..c2a1698 100644 --- a/intl/Makefile +++ b/intl/Makefile @@ -48,7 +48,7 @@ $(objpfx)plural.o: plural.c include ../Rules -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared)) ifneq ($(strip $(MSGFMT)),:) tests: $(objpfx)tst-translit.out $(objpfx)tst-gettext2.out \ diff --git a/io/Makefile b/io/Makefile index 9601a6f..b076e4d 100644 --- a/io/Makefile +++ b/io/Makefile @@ -98,7 +98,7 @@ test-stat2-ARGS = Makefile . $(objpfx)test-stat2 tst-statvfs-ARGS = $(objpfx)tst-statvfs tst-statvfs.c /tmp -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) tests: $(objpfx)ftwtest.out $(objpfx)ftwtest.out: ftwtest-sh $(objpfx)ftwtest diff --git a/libio/Makefile b/libio/Makefile index 0d28cea..9ccd6a0 100644 --- a/libio/Makefile +++ b/libio/Makefile @@ -175,7 +175,7 @@ shared-only-routines = oldiofopen oldiofdopen oldiofclose oldfileops \ include ../Rules -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) tests: $(objpfx)test-freopen.out ifeq (yes,$(build-shared)) # Run tst-fopenloc.check only if shared library is enabled since it diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 7ae362c..3e775ed 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,8 @@ +2012-10-23 Joseph Myers <joseph@codesourcery.com> + + * Makefile [$(cross-compiling) = no]: Change condition to + [$(run-built-tests) = yes]. + 2012-10-22 Jim Blandy <jimb@codesourcery.com> Joseph Myers <joseph@codesourcery.com> diff --git a/localedata/Makefile b/localedata/Makefile index 5be2413..d1b277e 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -59,7 +59,7 @@ generated-dirs := $(ld-test-names) tt_TT de_DE.437 \ # Get $(inst_i18ndir) defined. include ../Makeconfig -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl \ tst_iswctype tst_iswdigit tst_iswgraph \ tst_iswlower tst_iswprint tst_iswpunct \ @@ -113,7 +113,7 @@ CFLAGS-tst-mbswcs5.c = -Wno-format CFLAGS-tst-trans.c = -Wno-format -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) # We have to generate locales LOCALES := de_DE.ISO-8859-1 de_DE.UTF-8 en_US.ANSI_X3.4-1968 \ en_US.ISO-8859-1 ja_JP.EUC-JP da_DK.ISO-8859-1 \ diff --git a/malloc/Makefile b/malloc/Makefile index 9dd0336..1e0281f 100644 --- a/malloc/Makefile +++ b/malloc/Makefile @@ -104,7 +104,7 @@ $(objpfx)libmcheck.a: $(objpfx)mcheck-init.o lib: $(objpfx)libmcheck.a -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared)) ifneq ($(PERL),no) tests: $(objpfx)tst-mtrace.out diff --git a/misc/Makefile b/misc/Makefile index ea68d26..4cb7f24 100644 --- a/misc/Makefile +++ b/misc/Makefile @@ -77,7 +77,7 @@ gpl2lgpl := error.c error.h tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \ tst-error1 tst-pselect tst-insremque tst-mntent2 bug-hsearch1 -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-error1-mem endif diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 10b0842..2743631 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2012-10-23 Joseph Myers <joseph@codesourcery.com> + + * Makefile [$(cross-compiling) = no]: Change condition to + [$(run-built-tests) = yes]. + 2012-10-23 Jim Blandy <jimb@codesourcery.com> Joseph Myers <joseph@codesourcery.com> diff --git a/nptl/Makefile b/nptl/Makefile index c370719..02db930 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -448,7 +448,7 @@ LDFLAGS-tst-atfork2 = -rdynamic tst-atfork2-ENV = MALLOC_TRACE=$(objpfx)tst-atfork2.mtrace $(objpfx)tst-atfork2mod.so: $(shared-thread-library) -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-stack3-mem endif tst-stack3-ENV = MALLOC_TRACE=$(objpfx)tst-stack3.mtrace @@ -472,7 +472,7 @@ LDFLAGS-tst-tls5 = $(no-as-needed) LDFLAGS-tst-tls5mod.so = -Wl,-soname,tst-tls5mod.so ifeq ($(build-shared),yes) -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-tls6.out endif $(objpfx)tst-tls6.out: tst-tls6.sh $(objpfx)tst-tls5 \ @@ -583,7 +583,7 @@ generated += banner.h LDFLAGS-pthread.so += -e __nptl_main endif -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) ifeq (yes,$(build-shared)) tests: $(objpfx)tst-cancel-wrappers.out $(objpfx)tst-cancel-wrappers.out: tst-cancel-wrappers.sh diff --git a/posix/Makefile b/posix/Makefile index 1871e72..86e6c6b 100644 --- a/posix/Makefile +++ b/posix/Makefile @@ -112,7 +112,7 @@ generated := $(addprefix wordexp-test-result, 1 2 3 4 5 6 7 8 9 10) \ include ../Rules -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) # globtest and wordexp-test currently only works with shared libraries ifeq (yes,$(build-shared)) tests: $(objpfx)globtest.out $(objpfx)wordexp-tst.out @@ -211,7 +211,7 @@ ptestcases.h: PTESTS PTESTS2C.sed # Run a test on the header files we use. # XXX Please note that for now we ignore the result of this test. tests: $(objpfx)annexc.out -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) tests: $(objpfx)bug-regex2-mem $(objpfx)bug-regex14-mem \ $(objpfx)bug-regex21-mem $(objpfx)bug-regex31-mem $(objpfx)tst-rxspencer-mem\ $(objpfx)tst-pcre-mem $(objpfx)tst-boost-mem $(objpfx)tst-getconf.out \ diff --git a/resolv/Makefile b/resolv/Makefile index 4777317..a398694 100644 --- a/resolv/Makefile +++ b/resolv/Makefile @@ -108,7 +108,7 @@ $(objpfx)tst-leaks: $(objpfx)libresolv.so tst-leaks-ENV = MALLOC_TRACE=$(objpfx)tst-leaks.mtrace $(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@ -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) ifneq (no,$(PERL)) tests: $(objpfx)mtrace-tst-leaks endif @@ -117,7 +117,7 @@ endif tst-leaks2-ENV = MALLOC_TRACE=$(objpfx)tst-leaks2.mtrace $(objpfx)mtrace-tst-leaks2: $(objpfx)tst-leaks2.out $(common-objpfx)malloc/mtrace $(objpfx)tst-leaks2.mtrace > $@ -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) ifneq (no,$(PERL)) xtests: $(objpfx)mtrace-tst-leaks2 endif diff --git a/stdio-common/Makefile b/stdio-common/Makefile index 5e2e48d..f7f152c 100644 --- a/stdio-common/Makefile +++ b/stdio-common/Makefile @@ -63,7 +63,7 @@ test-srcs = tst-unbputc tst-printf include ../Rules -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) .PHONY: do-tst-unbputc do-tst-printf tests: do-tst-unbputc do-tst-printf diff --git a/stdlib/Makefile b/stdlib/Makefile index a5318ee..682a70c 100644 --- a/stdlib/Makefile +++ b/stdlib/Makefile @@ -122,7 +122,7 @@ bug-fmtmsg1-ENV = SEV_LEVEL=foo,11,newsev # Run a test on the header files we use. tests: $(objpfx)isomac.out -ifeq (no,$(cross-compiling)) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-fmtmsg.out endif diff --git a/string/Makefile b/string/Makefile index 54eae70..740006e 100644 --- a/string/Makefile +++ b/string/Makefile @@ -78,7 +78,7 @@ CFLAGS-tst-inlcall.c = -fno-builtin CFLAGS-bug-strstr1.c = -fno-builtin CFLAGS-bug-strcasestr1.c = -fno-builtin -ifeq ($(cross-compiling),no) +ifeq ($(run-built-tests),yes) tests: $(objpfx)tst-svc.out $(objpfx)tst-svc.out: tst-svc.input $(objpfx)tst-svc GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ |