This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] locale: Add LOCPATH diagnostics to the locale program


* Joseph Myers:

> On Tue, 23 Apr 2019, Florian Weimer wrote:
>
>> diff --git a/locale/Makefile b/locale/Makefile
>> index 764e751c36..6822b795dd 100644
>> --- a/locale/Makefile
>> +++ b/locale/Makefile
>> @@ -28,6 +28,7 @@ routines	= setlocale findlocale loadlocale loadarchive \
>>  		  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
>>  		  newlocale duplocale freelocale uselocale
>>  tests		= tst-C-locale tst-locname tst-duplocale
>> +tests-special	= $(objpfx)tst-locale-locpath.out
>>  categories	= ctype messages monetary numeric time paper name \
>>  		  address telephone measurement identification collate
>>  aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
>> @@ -107,3 +108,7 @@ cpp-srcs-left := $(localedef-modules) $(localedef-aux) $(locale-modules) \
>>  		 $(lib-modules)
>>  lib := locale-programs
>>  include $(patsubst %,$(..)libof-iterator.mk,$(cpp-srcs-left))
>> +
>> +$(objpfx)tst-locale-locpath.out : tst-locale-locpath.sh $(objpfx)locale
>> +	$(SHELL) $< '$(common-objpfx)' '$(test-wrapper)' '$(test-wrapper-env)' > $@; \
>> +	$(evaluate-test)
>
> This is missing run-built-tests conditionals so wrongly tries to run the 
> test unconditionally for cross-compilation.

Oh.  I will try to remember this aspect of tests-special.  I fixed it
with the patch below.  Committed.

Thanks,
Florian

locale/tst-locale-locpath: Run test only for $(run-built-tests) == yes

2019-04-24  Florian Weimer  <fweimer@redhat.com>

	* locale/Makefile (tests-special): Guard setting by
	$(run-built-tests) == yes, otherwise tst-locale-locpath attempts
	to run while cross-compiling.

diff --git a/locale/Makefile b/locale/Makefile
index 6822b795dd..0ad99ecabf 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -28,7 +28,6 @@ routines	= setlocale findlocale loadlocale loadarchive \
 		  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
 		  newlocale duplocale freelocale uselocale
 tests		= tst-C-locale tst-locname tst-duplocale
-tests-special	= $(objpfx)tst-locale-locpath.out
 categories	= ctype messages monetary numeric time paper name \
 		  address telephone measurement identification collate
 aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
@@ -63,6 +62,10 @@ lib-modules		:= charmap-dir simple-hash xmalloc xstrdup \
 GPERF = gperf
 GPERFFLAGS = -acCgopt -k1,2,5,9,$$ -L ANSI-C
 
+ifeq ($(run-built-tests),yes)
+tests-special += $(objpfx)tst-locale-locpath.out
+endif
+
 include ../Rules
 
 CFLAGS-md5.c += -I../crypt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]