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] Run tst-fopenloc if $(build-shared) is yes


On Mon, Sep 10, 2012 at 6:59 AM, Andreas Jaeger <aj@suse.com> wrote:
> On Monday, September 10, 2012 06:42:49 H.J. Lu wrote:
>> On Mon, Sep 10, 2012 at 6:31 AM, Andreas Jaeger <aj@suse.com> wrote:
>> > On Monday, September 10, 2012 06:24:35 H.J. Lu wrote:
>> >> Hi,
>> >>
>> >> tst-fopenloc depends on shared localedata objects and
>> >> tst-fopenloc.check depends on tst-fopenloc.  This patch enables
>> >> them
>> >> only if $(build-shared) is yes.  OK to install.
>> >
>> > We haven't done this in the past but since you're touching all of
>> > this, a suggestion from my side: Add to each of these Makefile an
>> > explanation why tests are disabled.
>>
>> Thanks for the feedback.
>>
>> > This is even not clear from your changelog, it only says "Add tst-
>> > fopenloc" - I suggest to say "Add test-fopenloc since it depends on
>> > shared localedata objects."
>>
>> Is this an approval with those comments added?
>
> Yes,

This is what I checked.  Are my other similar changes OK with
similar comments added?

Thanks.


-- 
H.J.
---
diff --git a/ChangeLog b/ChangeLog
index c2bd4f0..c26b7a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>

+	* libio/Makefile: Include ../Makeconfig before tests.
+	(tests): Add tst-fopenloc and depend on $(objpfx)tst-fopenloc.check
+	only if $(build-shared) is yes.
+
+2012-09-10  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* iconv/gconv_db.c: Update copyright years.

 2012-09-10  Liubov Dmitrieva  <liubov.dmitrieva@gmail.com>
diff --git a/libio/Makefile b/libio/Makefile
index c555dd0..090e194 100644
--- a/libio/Makefile
+++ b/libio/Makefile
@@ -46,8 +46,10 @@ routines	:=						      \
 									      \
 	libc_fatal fmemopen

+include ../Makeconfig
+
 tests = tst_swprintf tst_wprintf tst_swscanf tst_wscanf tst_getwc tst_putwc   \
-	tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 tst-fopenloc \
+	tst_wprintf2 tst-widetext test-fmemopen tst-ext tst-ext2 \
 	tst-fgetws tst-ungetwc1 tst-ungetwc2 tst-swscanf tst-sscanf	      \
 	tst-mmap-setvbuf bug-ungetwc1 bug-ungetwc2 tst-atime tst-eof          \
 	tst-freopen bug-rewind bug-rewind2 bug-ungetc bug-fseek \
@@ -58,12 +60,15 @@ tests = tst_swprintf tst_wprintf tst_swscanf
tst_wscanf tst_getwc tst_putwc   \
 	tst-wmemstream1 tst-wmemstream2 \
 	bug-memstream1 bug-wmemstream1 \
 	tst-setvbuf1 tst-popen1 tst-fgetwc bug-wsetpos bug-fclose1
+ifeq (yes,$(build-shared))
+# Add test-fopenloc only if shared library is enabled since it depends on
+# shared localedata objects.
+tests += tst-fopenloc
+endif
 test-srcs = test-freopen

 all: # Make this the default target; it will be defined in Rules.

-include ../Makeconfig
-
 ifeq ($(versioning),yes)
 routines += oldiofopen oldiofdopen oldiofclose oldiopopen oldpclose \
 	    oldtmpfile oldiofgetpos oldiofgetpos64 oldiofsetpos	    \
@@ -170,7 +175,12 @@ shared-only-routines = oldiofopen oldiofdopen
oldiofclose oldfileops	\
 include ../Rules

 ifeq (no,$(cross-compiling))
-tests: $(objpfx)test-freopen.out $(objpfx)tst-fopenloc.check
+tests: $(objpfx)test-freopen.out
+ifeq (yes,$(build-shared))
+# Run tst-fopenloc.check only if shared library is enabled since it
+# depends on tst-fopenloc.out.
+tests: $(objpfx)tst-fopenloc.check
+endif
 endif

 $(objpfx)test-freopen.out: test-freopen.sh $(objpfx)test-freopen


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