[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: spurious "make check" failure in gzip-1.3.6

From: Paul Eggert
Subject: Re: spurious "make check" failure in gzip-1.3.6
Date: Sat, 25 Nov 2006 22:11:44 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Jim Meyering <address@hidden> writes:

> 2006-11-25  Jim Meyering  <address@hidden>
>       * Makefile.am (check-local): Use the list of files in $(DISTFILES),
>       rather than running find on the current directory, in case there are
>       non-distribution files (e.g., build log) changing during the test.

Thanks for catching that bug.  (That's what I get for adding a test
case at almost the last minute.  In my defense, gzip had zero test
cases until just now....)

Unfortunately DISTFILES won't work as intended with out-of-directory
builds, as you'll get a lot of files that aren't there because they're
under $(top_srcdir) rather than under ".".  I installed the following
slightly-more-conservative patch:

2006-11-25  Paul Eggert  <address@hidden>

        * Makefile.am (FILES_TO_CHECK): New macro.
        (check-local): Check only the files in FILES_TO_CHECK, since some
        files under the working directory might be mutating as the test is
        run, e.g., with "make check >log".  Problem reported by Jim

--- Makefile.am 20 Nov 2006 08:40:33 -0000      1.11
+++ Makefile.am 26 Nov 2006 06:09:44 -0000      1.13
@@ -59,10 +59,11 @@ SUFFIXES = .in
        chmod a+x $@
 # A simple test, just of gzip -- more of a sanity check than anything else.
-       for file in `find * -type f -print | sort`; do \
-         test -r "$$file" || continue; \
-         ./gzip -cv $$file | ./gzip -d | cmp - "$$file" || exit; \
+FILES_TO_CHECK = $(bin_SCRIPTS) $(gzip_LDADD) \
+  $(top_srcdir)/ChangeLog $(top_srcdir)/configure $(top_srcdir)/gzip.c
+check-local: $(FILES_TO_CHECK)
+       for file in $(FILES_TO_CHECK); do \
+         ./gzip -cv -- "$$file" | ./gzip -d | cmp - "$$file" || exit; \
        @echo 'Test succeeded.'

reply via email to

[Prev in Thread] Current Thread [Next in Thread]