From unknown Sun Jun 22 07:32:42 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8969 <8969@debbugs.gnu.org> To: bug#8969 <8969@debbugs.gnu.org> Subject: Status: improve synchronization between examples in the manual and test cases Reply-To: bug#8969 <8969@debbugs.gnu.org> Date: Sun, 22 Jun 2025 14:32:42 +0000 retitle 8969 improve synchronization between examples in the manual and tes= t cases reassign 8969 automake submitter 8969 Stefano Lattarini severity 8969 wishlist thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 30 18:39:37 2011 Received: (at submit) by debbugs.gnu.org; 30 Jun 2011 22:39:38 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcPtZ-000441-8f for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:39:37 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcPtW-00043o-Un for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:39:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcPtQ-0002nD-Ch for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:39:29 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_DKIM_INVALID, T_TO_NO_BRKTS_FREEMAIL autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:36341) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPtQ-0002n4-8F for submit@debbugs.gnu.org; Thu, 30 Jun 2011 18:39:28 -0400 Received: from eggs.gnu.org ([140.186.70.92]:42108) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPtO-0004GD-Mn for bug-automake@gnu.org; Thu, 30 Jun 2011 18:39:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcPtM-0002mp-Vg for bug-automake@gnu.org; Thu, 30 Jun 2011 18:39:26 -0400 Received: from mail-wy0-f169.google.com ([74.125.82.169]:52304) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcPtM-0002md-HT; Thu, 30 Jun 2011 18:39:24 -0400 Received: by wyg36 with SMTP id 36so2294717wyg.0 for ; Thu, 30 Jun 2011 15:39:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=wVOgvEQ9jrjrVwMxOLWJT05WJpv+eHtg9QUS+jsEzdM=; b=Ept/OubP2T8ypjmRv/u3MkAzGbJDQo+OQQX7JVkfcGut1vRseM4cSUPCYitbm9C2K+ UDgMR4DPIJhwznE6VE/Wix8Bn3weJUty70cSCWxe6nH+H6FKCMB7QuLpec+P/Ps2ukUY Dp+wQo/N4Ks5TjvAj9uEggPylAc59nBJmWxa0= Received: by 10.227.196.208 with SMTP id eh16mr2314946wbb.37.1309473563427; Thu, 30 Jun 2011 15:39:23 -0700 (PDT) Received: from bigio.localnet (host205-50-dynamic.58-82-r.retail.telecomitalia.it [82.58.50.205]) by mx.google.com with ESMTPS id gg16sm1935193wbb.51.2011.06.30.15.39.21 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 15:39:22 -0700 (PDT) From: Stefano Lattarini To: bug-automake@gnu.org Subject: improve synchronization between examples in the manual and test cases Date: Fri, 1 Jul 2011 00:39:12 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201106280824.14084.stefano.lattarini@gmail.com> <20110628203727.158570@gmx.net> In-Reply-To: <20110628203727.158570@gmx.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201107010039.13579.stefano.lattarini@gmail.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -5.1 (-----) X-Debbugs-Envelope-To: submit Cc: Ralf Wildenhues , automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.1 (-----) Severity: wishlist thanks Reference: On Tuesday 28 June 2011, Ralf Wildenhues wrote: > * Stefano Lattarini wrote on Tue, Jun 28, 2011 at 08:24:13AM CEST: > > On Monday 27 June 2011, Ralf Wildenhues wrote: > > > Sure. Well, do they use some format already? > > > > > Well, there are only two of them, and both follows this format: > > > > @c The test case for the setup described here is > > @c test/subdircond2.test > > @c Try to keep it in sync. > > > > (which is wrongish BTW, as the testsuite subdirectory is `tests/', > > not `test/') > > > > I'd go with one of these simple formats: > > @c Keep in sync with subdircond2.test > > I like this one (with a trailing dot ;-) > > ;-) > I'll soon post a patch that improves the synchronization between some examples from the manual and some test cases. In the process of writing it, I've noticed that various non-trivial examples from the manual are not tested; and while I've remedied to part of this problem with my patch, a lot remains to be done; so I'm opening this bug to avoid forgetting about the issue. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Thu Jun 30 19:00:20 2011 Received: (at 8969) by debbugs.gnu.org; 30 Jun 2011 23:00:20 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcQDa-0004XC-7e for submit@debbugs.gnu.org; Thu, 30 Jun 2011 19:00:19 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcQDV-0004Ww-UE for 8969@debbugs.gnu.org; Thu, 30 Jun 2011 19:00:16 -0400 Received: by wyj26 with SMTP id 26so1911771wyj.3 for <8969@debbugs.gnu.org>; Thu, 30 Jun 2011 16:00:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; bh=fxABYZy+5HfI/iwCmJPj3LxXbw3Psqo6f8+8GPtQRDg=; b=BS+BTaqUQtd9OpNqDo3O98/4CLdB4bjzN5EBWhLVLe4FnY3PYEy8EhNBibGFIihB6k uewJ564UPxTLy981/8BUX7zdZhsKL+1OpgAAljYcXzmTRUCpe5o2o8AJrEuNRIQpaWNG wvblkWOaG365Mq2uudnHwQLfFiti858HvDsNs= Received: by 10.227.156.70 with SMTP id v6mr2325942wbw.21.1309474807875; Thu, 30 Jun 2011 16:00:07 -0700 (PDT) Received: from bigio.localnet (host205-50-dynamic.58-82-r.retail.telecomitalia.it [82.58.50.205]) by mx.google.com with ESMTPS id fp5sm722416wbb.66.2011.06.30.16.00.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 30 Jun 2011 16:00:06 -0700 (PDT) From: Stefano Lattarini To: 8969@debbugs.gnu.org Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases Date: Fri, 1 Jul 2011 00:59:53 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <20110628203727.158570@gmx.net> <201107010039.13579.stefano.lattarini@gmail.com> In-Reply-To: <201107010039.13579.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_p/PDOcm2stzXieS" Message-Id: <201107010059.53804.stefano.lattarini@gmail.com> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 8969 Cc: automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) --Boundary-00=_p/PDOcm2stzXieS Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Friday 01 July 2011, Stefano Lattarini wrote: > Severity: wishlist > thanks > > Reference: > > > On Tuesday 28 June 2011, Ralf Wildenhues wrote: > > * Stefano Lattarini wrote on Tue, Jun 28, 2011 at 08:24:13AM CEST: > > > On Monday 27 June 2011, Ralf Wildenhues wrote: > > > > Sure. Well, do they use some format already? > > > > > > > Well, there are only two of them, and both follows this format: > > > > > > @c The test case for the setup described here is > > > @c test/subdircond2.test > > > @c Try to keep it in sync. > > > > > > (which is wrongish BTW, as the testsuite subdirectory is `tests/', > > > not `test/') > > > > > > I'd go with one of these simple formats: > > > @c Keep in sync with subdircond2.test > > > > I like this one (with a trailing dot ;-) > > > > ;-) > > > I'll soon post a patch that improves the synchronization between > some examples from the manual and some test cases. In the process > of writing it, I've noticed that various non-trivial examples from > the manual are not tested; and while I've remedied to part of this > problem with my patch, a lot remains to be done; so I'm opening > this bug to avoid forgetting about the issue. > > Regards, > Stefano > And here it is the promised patch. I will push in 72 hours if there is no objection by then. Regards, Stefano --Boundary-00=_p/PDOcm2stzXieS Content-Type: text/x-patch; charset="utf-8"; name="0001-docs-tests-synchronize-examples-from-docs-to-tests.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="0001-docs-tests-synchronize-examples-from-docs-to-tests.patch" =46rom 2dd820b423bea12eac7b94fd8ed2563ee21cf9e1 Mon Sep 17 00:00:00 2001 Message-Id: <2dd820b423bea12eac7b94fd8ed2563ee21cf9e1.1309473910.git.stefan= o.lattarini@gmail.com> =46rom: Stefano Lattarini Date: Thu, 30 Jun 2011 20:05:25 +0200 Subject: [PATCH] docs, tests: synchronize examples from docs to tests * tests/README (Writing test cases): Give suggestions on how to keep test cases and examples in the documentation synchronized. * doc/automake.texi: Improve or fix existing testcase-referencing comments, and add many new ones. * HACKING (Administrivia): Suggest to test complex examples and idioms from the manual. * tests/specflg8.test: Improve synchronization with the example in the manual. * tests/output11.test:Likewise. * tests/txinfo21.test:Likewise. * tests/interp.test: Likewise. Since we are at it, and enable the `errexit' shell flag, do related changes, and add trailing `:'command. * tests/amhello-cflags.test: New test. * tests/amhello-cross-compile.test: Likewise. * tests/amhello-binpkg.test: Likewise. * tests/tests-environment-backcompat: Likewise. * tests/parallel-tests-log-compiler-example.test: Likewise. * tests/Makefile.am (TESTS): Update. =2D-- ChangeLog | 23 ++++++++ HACKING | 7 ++- doc/automake.texi | 54 ++++++++++++++---- tests/Makefile.am | 5 ++ tests/Makefile.in | 5 ++ tests/README | 7 ++ tests/amhello-binpkg.test | 44 +++++++++++++++ tests/amhello-cflags.test | 49 ++++++++++++++++ tests/amhello-cross-compile.test | 54 ++++++++++++++++++ tests/interp.test | 18 ++++-- tests/parallel-tests-log-compiler-example.test | 71 ++++++++++++++++++++= ++++ tests/specflg8.test | 35 ++++++------ tests/tests-environment-backcompat.test | 65 ++++++++++++++++++++= ++ tests/txinfo21.test | 4 +- 14 files changed, 402 insertions(+), 39 deletions(-) create mode 100755 tests/amhello-binpkg.test create mode 100755 tests/amhello-cflags.test create mode 100755 tests/amhello-cross-compile.test create mode 100755 tests/parallel-tests-log-compiler-example.test create mode 100755 tests/tests-environment-backcompat.test diff --git a/ChangeLog b/ChangeLog index f1e10c2..c77326d 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,26 @@ +2011-07-01 Stefano Lattarini + + docs, tests: synchronize examples from docs to tests + * tests/README (Writing test cases): Give suggestions on how to + keep test cases and examples in the documentation synchronized. + * doc/automake.texi: Improve or fix existing testcase-referencing + comments, and add many new ones. + * HACKING (Administrivia): Suggest to test complex examples and + idioms from the manual. + * tests/specflg8.test: Improve synchronization with the example + in the manual. + * tests/output11.test:Likewise. + * tests/txinfo21.test:Likewise. + * tests/interp.test: Likewise. Since we are at it, and enable + the `errexit' shell flag, do related changes, and add trailing + `:'command. + * tests/amhello-cflags.test: New test. + * tests/amhello-cross-compile.test: Likewise. + * tests/amhello-binpkg.test: Likewise. + * tests/tests-environment-backcompat: Likewise. + * tests/parallel-tests-log-compiler-example.test: Likewise. + * tests/Makefile.am (TESTS): Update. + 2011-06-23 Stefano Lattarini =20 docs: avoid a footnote, some related rewordings and improvements diff --git a/HACKING b/HACKING index a3e37f0..334d74c 100644 =2D-- a/HACKING +++ b/HACKING @@ -20,6 +20,10 @@ * If somebody reports a new bug, mention his name in the ChangeLog entry and in the test case you write. Put him into THANKS. =20 +* When documenting a non-trivial idiom or example in the manual, be + sure to add a test case for it, and to reference such test case from + a proper Texinfo comment. + * The correct response to most actual bugs is to write a new test case which demonstrates the bug. Then fix the bug, re-run the test suite, and check everything in. @@ -240,7 +244,8 @@ =20 ----- =20 =2DCopyright (C) 2003, 2007, 2008, 2010 Free Software Foundation, Inc. +Copyright (C) 2003, 2007, 2008, 2010, 2011 Free Software Foundation, +Inc. =20 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/doc/automake.texi b/doc/automake.texi index e4c96ae..f0a3c43 100644 =2D-- a/doc/automake.texi +++ b/doc/automake.texi @@ -904,6 +904,7 @@ GNU Make Manual}). VPATH builds have other interesting uses. One is to build the same sources with multiple configurations. For instance: =20 +@c Keep in sync with amhello-cflags.test. @example ~ % @kbd{tar zxf ~/amhello-1.0.tar.gz} ~ % @kbd{cd amhello-1.0} @@ -1055,6 +1056,7 @@ instance my cross-compiler for MinGW32 has its binari= es called Here is how we could build @code{amhello-1.0} for @code{i586-mingw32msvc} on a GNU/Linux PC. =20 +@c Keep in sync with amhello-cross-compile.test. @smallexample ~/amhello-1.0 % @kbd{./configure --build i686-pc-linux-gnu --host i586-min= gw32msvc} checking for a BSD-compatible install... /usr/bin/install -c @@ -1169,6 +1171,7 @@ by some means. For instance here is how we could create a binary package containing a snapshot of all the files to be installed. =20 +@c Keep in sync with amhello-binpkg.test. @example ~/amhello-1.0 % @kbd{./configure --prefix /usr} @dots{} @@ -1848,6 +1851,7 @@ When examining a variable definition, Automake will r= ecursively examine variables referenced in the definition. For example, if Automake is looking at the content of @code{foo_SOURCES} in this snippet =20 +@c Keep in sync with interp.test. @example xs =3D a.c b.c foo_SOURCES =3D c.c $(xs) @@ -2026,6 +2030,7 @@ defined (e.g., @samp{zardir}). For instance, the following snippet will install @file{file.xml} into @samp{$(datadir)/xml}. =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example xmldir =3D $(datadir)/xml xml_DATA =3D file.xml @@ -2036,6 +2041,7 @@ performs to diagnose suspicious directory/primary cou= ples (in the unlikely case these checks are undesirable, and you really know what you're doing). For example, Automake would error out on this input: =20 +@c Should be tested in primary-prefix-invalid-couples.test. @example # Forbidden directory combinations, automake will error out on this. pkglib_PROGRAMS =3D foo @@ -2045,6 +2051,7 @@ doc_LIBRARIES =3D libquux.a @noindent but it will succeed with this: =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example # Work around forbidden directory combinations. Do not use this # without a very good reason! @@ -2125,6 +2132,7 @@ data_DATA =3D file1 @dots{} file@var{N} file@var{N+1}= @dots{} file@var{2N} @noindent may also be written as =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example data_DATA =3D file1 @dots{} file@var{N} data2dir =3D $(datadir) @@ -2455,6 +2463,7 @@ example in the manual. However if you were to build = @code{true} and @code{false} in real life, you would probably use per-program compilation flags, like so: =20 +@c Keep in sync with specflg7.test and specflg8.test. @example bin_PROGRAMS =3D false true =20 @@ -2778,6 +2787,7 @@ literals. If part of the specification uses shell va= riables, @command{automake} will not be able to fulfill this setup, and you will have to complete the missing bits by hand. For instance, on =20 +@c Keep in sync with output11.test. @example file=3Dinput @dots{} @@ -2793,6 +2803,7 @@ source file.) =20 Similarly =20 +@c Keep in sync with output11.test. @example file=3Doutput file2=3Dout:in @@ -3420,6 +3431,7 @@ installs this macro so that @command{aclocal} will fi= nd it. A macro file's name should end in @file{.m4}. Such files should be installed in @file{$(datadir)/aclocal}. This is as simple as writing: =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example aclocaldir =3D $(datadir)/aclocal aclocal_DATA =3D mymacro.m4 myothermacro.m4 @@ -4258,9 +4270,7 @@ does not know the possible values of these variables.= In this case @cindex @code{SUBDIRS} and @code{AM_CONDITIONAL} @cindex @code{AM_CONDITIONAL} and @code{SUBDIRS} =20 =2D@c The test case for the setup described here is =2D@c test/subdircond2.test =2D@c Try to keep it in sync. +@c Keep in sync with subcond2.test. =20 @file{configure} should output the @file{Makefile} for each directory and define a condition into which @file{opt/} should be built. @@ -4300,9 +4310,7 @@ automatically because it knows that @code{MAYBE_OPT} = can contain @cindex @code{SUBDIRS} and @code{AC_SUBST} @cindex @code{AC_SUBST} and @code{SUBDIRS} =20 =2D@c The test case for the setup described here is =2D@c test/subdircond3.test =2D@c Try to keep it in sync. +@c Keep in sync with subcond3.test. =20 Another possibility is to define @code{MAYBE_OPT} from @file{./configure} using @code{AC_SUBST}: @@ -4460,6 +4468,7 @@ often be replaced by several variables, one for each = destination directory (@pxref{Uniform}). For instance, the last example could be rewritten as follows: =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example imagesdir =3D $(pkgdatadir)/images soundsdir =3D $(pkgdatadir)/sounds @@ -4910,6 +4919,7 @@ You can also use Automake conditionals (@pxref{Condit= ionals}) to select programs to be built. In this case you don't have to worry about @samp{$(EXEEXT)} or @code{EXTRA_PROGRAMS}. =20 +@c Keep in sync with exeext.test. @example bin_PROGRAMS =3D cpio pax if WANT_MT @@ -4960,6 +4970,7 @@ Extra objects can be added to a library using the @code{@var{library}_LIBADD} variable. This should be used for objects determined by @command{configure}. Again from @code{cpio}: =20 +@c Keep in sync with pr401c.test. @example libcpio_a_LIBADD =3D $(LIBOBJS) $(ALLOCA) @end example @@ -5163,6 +5174,7 @@ relates to @file{libfoo.la} or @file{libbar.la} at th= e time it creates the link rule for these two libraries. Therefore the @option{-rpath} argument must be explicitly supplied. =20 +@c Keep in sync with ltcond.test. @example EXTRA_LTLIBRARIES =3D libfoo.la libbar.la lib_LTLIBRARIES =3D $(WANTEDLIBS) @@ -5178,6 +5190,7 @@ Automake is able to compute the @option{-rpath} setti= ng itself, because it's clear that both libraries will end up in @samp{$(libdir)} if they are installed. =20 +@c Keep in sync with ltcond.test. @example lib_LTLIBRARIES =3D if WANT_LIBFOO @@ -5204,6 +5217,7 @@ we could build a @file{libhello.la} library using eit= her @file{hello-linux.c} or @file{hello-generic.c} with the following @file{Makefile.am}. =20 +@c Keep in sync with ltcond2.test. @example lib_LTLIBRARIES =3D libhello.la libhello_la_SOURCES =3D hello-common.c @@ -5218,6 +5232,7 @@ either @file{hello-linux.lo} or @file{hello-@-generic= =2Elo}. =20 Or we could simply use an Automake conditional as follows. =20 +@c Keep in sync with ltcond2.test. @example lib_LTLIBRARIES =3D libhello.la libhello_la_SOURCES =3D hello-common.c @@ -5257,6 +5272,7 @@ dependency anywhere it won't be built (this is why Here is a sample setup merging libtool convenience libraries from subdirectories into one main @file{libtop.la} library. =20 +@c Keep in sync with ltconv.test. @example # -- Top-level Makefile.am -- SUBDIRS =3D sub1 sub2 @dots{} @@ -7475,6 +7491,7 @@ variable explicitly prevents byte-compilation. =20 Since Automake 1.8, we now recommend using @code{lisp_DATA} instead: =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example lisp_DATA =3D file1.el file2.el @end example @@ -7528,6 +7545,7 @@ files are not included in the distribution, you shoul= d use the Here is a typical setup for distributing @file{.java} files and installing the @file{.class} files resulting from their compilation. =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example javadir =3D $(datadir)/java dist_java_JAVA =3D a.java b.java @dots{} @@ -7601,6 +7619,7 @@ Automake ships with an Autoconf macro called @code{AM= _PATH_PYTHON} that will determine some Python-related directory variables (see below). If you have called @code{AM_PATH_PYTHON} from @file{configure.ac}, then you may use the variables +@c Keep in sync with primary-prefix-couples-documented-valid.test. @code{python_PYTHON} or @code{pkgpython_PYTHON} to list Python source files in your @file{Makefile.am}, depending on where you want your files installed (see the definitions of @code{pythondir} and @@ -7689,6 +7708,7 @@ This is the directory where Python extension modules = (shared libraries) should be installed. An extension module written in C could be declared as follows to Automake: =20 +@c Keep in sync with primary-prefix-couples-documented-valid.test. @example pyexec_LTLIBRARIES =3D quaternion.la quaternion_la_SOURCES =3D quaternion.c support.c support.h @@ -7885,6 +7905,7 @@ passed to @code{makeinfo} when building @file{.info} = files; and @samp{$(AM_MAKEINFOHTMLFLAGS)} is used when building @file{.html} files. =20 +@c Keep in sync with txinfo21.test. For instance, the following setting can be used to obtain one single @file{.html} file per manual, without node separators. @example @@ -8110,10 +8131,11 @@ Variables using the standard directory prefixes @sa= mp{bin}, For instance, @code{data_DATA} files are installed by @code{install-data}, while @code{bin_PROGRAMS} files are installed by @code{install-exec}. =20 =2DAny variable using a user-defined directory prefix with @samp{exec} in =2Dthe name (e.g., @code{myexecbin_PROGRAMS}) is installed by =2D@code{install-exec}. All other user-defined prefixes are installed by =2D@code{install-data}. +Any variable using a user-defined directory prefix with +@samp{exec} in the name (e.g., +@c Keep in sync with primary-prefix-couples-documented-valid.test. +@code{myexecbin_PROGRAMS}) is installed by @code{install-exec}. All +other user-defined prefixes are installed by @code{install-data}. =20 @node Extending Installation @section Extending Installation @@ -8298,7 +8320,7 @@ included if they are found in the current directory (= either physically, or as the target of a @file{Makefile.am} rule); this list is printed by @samp{automake --help}. Note that some files in this list are actually distributed only if other certain conditions hold (for example, =2D@c The following example is covered by autodist-config-headers.test. +@c Keep in sync with autodist-config-headers.test. the @file{config.h.top} and @file{config.h.bot} files are automatically distributed only if, e.g., @samp{AC_CONFIG_HEADERS([config.h])} is used in @file{configure.ac}). Also, files that are read by @command{configure} @@ -8488,6 +8510,7 @@ If you want @code{distcleancheck} to ignore built fil= es that have not been cleaned because they are also part of the distribution, add the following definition instead: =20 +@c Keep in sync with distcleancheck.test. @example distcleancheck_listfiles =3D \ find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \ @@ -8636,6 +8659,7 @@ set @code{TESTS_ENVIRONMENT} to an invocation of the = shell (e.g. interpreter. For instance, the following setup may be used to run tests with Perl: =20 +@c Keep in sync with tests-environment-backcompat.test. @example TESTS_ENVIRONMENT =3D $(PERL) -Mstrict -w TESTS =3D foo.pl bar.pl baz.pl @@ -8731,6 +8755,7 @@ this extension to be called with this driver. For al= l tests without a registered extension, the variables @code{LOG_COMPILER}, @code{AM_LOG_FLAGS}, and @code{LOG_FLAGS} may be used. For example, =20 +@c Keep in sync with parallel-tests-log-compiler-example.test. @example TESTS =3D foo.pl bar.py baz TEST_EXTENSIONS =3D .pl .py @@ -8804,6 +8829,7 @@ whose testsuite takes long time to execute. Luckily,= this problem can easily be avoided by overriding also @code{TEST_SUITE_LOG} at runtime; for example, =20 +@c Keep in sync with parallel-tests-log-override-2.test. @example env TEST_SUITE_LOG=3Dpartial.log TESTS=3D"..." make -e check @end example @@ -9507,6 +9533,7 @@ For instance, the following definition prevents Autom= ake from misinterpreting the @samp{.idlC.cpp:} rule as an attempt to transform @file{.idlC} files i= nto @file{.cpp} files. =20 +@c Keep in sync with suffix7.test. @example SUFFIXES =3D .idl C.cpp .idlC.cpp: @@ -10335,6 +10362,7 @@ Checks, autoconf, The Autoconf Manual}) and use @sa= mp{$(LN_S)} in For instance, here is how you could install a versioned copy of a program using @samp{$(LN_S)}: =20 +@c Keep in sync with insthook.test @example install-exec-hook: cd $(DESTDIR)$(bindir) && \ @@ -10349,7 +10377,9 @@ destination directory in order to create relative l= inks. When writing @code{install-exec-hook} or @code{install-data-hook}, please bear in mind that the exec/data distinction is based on the installation directory, not on the primary used (@pxref{The Two Parts of =2DInstall}). So a @code{foo_SCRIPTS} will be installed by +Install}). +@c Keep in sync with primary-prefix-couples-documented-valid.test. +So a @code{foo_SCRIPTS} will be installed by @code{install-data}, and a @code{barexec_SCRIPTS} will be installed by @code{install-exec}. You should define your hooks consequently. =20 diff --git a/tests/Makefile.am b/tests/Makefile.am index 4f78e9a..8da5a21 100644 =2D-- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -85,6 +85,9 @@ alloca.test \ alloca2.test \ alpha.test \ alpha2.test \ +amhello-cflags.test \ +amhello-cross-compile.test \ +amhello-binpkg.test \ amassign.test \ ammissing.test \ amopt.test \ @@ -157,6 +160,7 @@ check11.test \ check-exported-srcdir.test \ check-tests-in-builddir.test \ check-tests_environment.test \ +tests-environment-backcompat.test \ checkall.test \ clean.test \ clean2.test \ @@ -600,6 +604,7 @@ parallel-tests-subdir.test \ parallel-tests-log-override-1.test \ parallel-tests-log-override-2.test \ parallel-tests-log-override-recheck.test \ +parallel-tests-log-compiler-example.test \ parse.test \ percent.test \ percent2.test \ diff --git a/tests/Makefile.in b/tests/Makefile.in index a6ff6f5..1504233 100644 =2D-- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -362,6 +362,9 @@ alloca.test \ alloca2.test \ alpha.test \ alpha2.test \ +amhello-cflags.test \ +amhello-cross-compile.test \ +amhello-binpkg.test \ amassign.test \ ammissing.test \ amopt.test \ @@ -434,6 +437,7 @@ check11.test \ check-exported-srcdir.test \ check-tests-in-builddir.test \ check-tests_environment.test \ +tests-environment-backcompat.test \ checkall.test \ clean.test \ clean2.test \ @@ -877,6 +881,7 @@ parallel-tests-subdir.test \ parallel-tests-log-override-1.test \ parallel-tests-log-override-2.test \ parallel-tests-log-override-recheck.test \ +parallel-tests-log-compiler-example.test \ parse.test \ percent.test \ percent2.test \ diff --git a/tests/README b/tests/README index 57b2ddb..ca17c4f 100644 =2D-- a/tests/README +++ b/tests/README @@ -93,6 +93,13 @@ Do Cite the PR number (if any), and the original reporter (if any), so we can find or ask for information if needed. =20 + If a test checks examples or idioms given in the documentation, make + sure the documentation reference them appropriately in comments, as in: + @c Keep in sync with autodist-config-headers.test. + @example + ... + @end example + Use `required=3D...' for required tools. Do not explicitly require tools which can be taken for granted because they're listed in the GNU Coding Standards (for example, `gzip'). diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test new file mode 100755 index 0000000..8da3495 =2D-- /dev/null +++ b/tests/amhello-binpkg.test @@ -0,0 +1,44 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Document an example from the manual about the `amhello' package: +# using DESDIR to build simple, no-frills binary packages. + +required=3Di586-mingw32msvc-gcc +. ./defs || Exit 1 + +set -e + +cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ + || fatal_ "cannot get amhello tarball" + +tar zxf amhello-1.0.tar.gz +cd amhello-1.0 + +./configure --prefix /usr +make +make DESTDIR=3D"`pwd`/inst" install +cd inst +find . -type f -print > ../files.lst +tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > t +LC_ALL=3DC sort t > tar.got + +diff - tar.got <<'END' +./usr/bin/hello +./usr/share/doc/amhello/README +END + +: diff --git a/tests/amhello-cflags.test b/tests/amhello-cflags.test new file mode 100755 index 0000000..5b36fb2 =2D-- /dev/null +++ b/tests/amhello-cflags.test @@ -0,0 +1,49 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Document an example from the manual about the `amhello' package: +# using VPATH builds to configure the same package with different options. + +required=3Dgcc +. ./defs || Exit 1 + +set -e + +cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ + || fatal_ "cannot get amhello tarball" + +tar zxf amhello-1.0.tar.gz +cd amhello-1.0 +mkdir debug optim +cd debug +../configure CFLAGS=3D'-g -O0' +$MAKE +ls -l . src # For debugging. +cd ../optim +../configure CFLAGS=3D'-O3 -fomit-frame-pointer' +$MAKE +ls -l . src # For debugging. +cd .. + +# Check that we have really compiled the objects with two different +# configurations. +for exeext in '' .exe :; do + test -f optim/src/hello$exeext && break + test "$exeext" =3D : && fatal_ "cannot determine extension of executable= s" +done +cmp optim/src/hello$exeext debug/src/hello$exeext && Exit 1 + +: diff --git a/tests/amhello-cross-compile.test b/tests/amhello-cross-compile= =2Etest new file mode 100755 index 0000000..8859ce4 =2D-- /dev/null +++ b/tests/amhello-cross-compile.test @@ -0,0 +1,54 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Document an example from the manual about the `amhello' package: +# cross-compiling a package from Linux/Unix to MinGW. + +required=3Di586-mingw32msvc-gcc +. ./defs || Exit 1 + +set -e + +cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ + || fatal_ "cannot get amhello tarball" + +host=3Di586-mingw32msvc +build=3D`"$testsrcdir"/../lib/config.guess` && test -n "$build" \ + || fatal_ "cannot guess build platform" +case $build in *mingw*) skip_ "build system is MinGW too";; esac + +tar zxf amhello-1.0.tar.gz +cd amhello-1.0 + +./configure --build "$build" --host "$host" > stdout \ + || { cat stdout ; Exit 1; } +cat stdout +grep '^checking for i586-mingw32msvc-strip\.\.\.' stdout +grep '^checking for i586-mingw32msvc-gcc\.\.\.' stdout +grep '^checking for suffix of executables\.\.\. \.exe *$' stdout +grep '^checking for suffix of object files\.\.\. o *$' stdout +grep '^checking whether i586-mingw32msvc-gcc accepts -g\.\.\. yes' stdout + +$MAKE + +cd src +file hello.exe > whatis +cat whatis +$EGREP 'DOS|Win' whatis +grep 'executable' whatis +grep 'ELF' whatis && Exit 1 + +: diff --git a/tests/interp.test b/tests/interp.test index af82e33..05464d2 100755 =2D-- a/tests/interp.test +++ b/tests/interp.test @@ -18,17 +18,23 @@ =20 . ./defs || Exit 1 =20 +set -e + cat >> configure.in << 'END' AC_PROG_CC END =20 cat > Makefile.am << 'END' =2Dbin_PROGRAMS =3D qqq =2Ds1 =3D z.c =2Dqqq_SOURCES =3D $(s1) +bin_PROGRAMS =3D foo +xs =3D a.c b.c +foo_SOURCES =3D c.c $(xs) END =20 =2D$ACLOCAL || Exit 1 =2D$AUTOMAKE || Exit 1 +$ACLOCAL +$AUTOMAKE + +$FGREP ' a.$(OBJEXT)' Makefile.in +$FGREP ' b.$(OBJEXT)' Makefile.in +$FGREP ' c.$(OBJEXT)' Makefile.in =20 =2D$FGREP 'z.$(OBJEXT)' Makefile.in +: diff --git a/tests/parallel-tests-log-compiler-example.test b/tests/paralle= l-tests-log-compiler-example.test new file mode 100755 index 0000000..746c128 =2D-- /dev/null +++ b/tests/parallel-tests-log-compiler-example.test @@ -0,0 +1,71 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# Test the example of usage of generic and extension-specific +# LOG_COMPILER and LOG_FLAGS given in the manual. + +parallel_tests=3Dyes +required=3Dpython +. ./defs || Exit 1 + +set -e + +cat >> configure.in < Makefile.am << 'END' +TESTS =3D foo.pl bar.py baz +TEST_EXTENSIONS =3D .pl .py +PL_LOG_COMPILER =3D $(PERL) +AM_PL_LOG_FLAGS =3D -w +PY_LOG_COMPILER =3D $(PYTHON) +AM_PY_LOG_FLAGS =3D -v +LOG_COMPILER =3D ./wrapper-script +AM_LOG_FLAGS =3D -d +END + +echo 'my $a =3D+ 2; exit (0);' > foo.pl +echo 'import sys; sys.exit(0);' > bar.py +: > baz + +cat > wrapper-script <<'END' +#!/bin/sh +echo "wrapper args: $*" +END +chmod a+x wrapper-script + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure + +st=3D0 +$MAKE check || st=3D$? +cat foo.log +cat bar.log +cat baz.log +test $st -eq 0 || Exit $st + +# Check that the wrappers have been run with the expected flags. +grep '[rR]eversed.*+=3D.*operator.*foo\.pl' foo.log +grep '^# *[cC]lear.*sys\.argv' bar.log +grep '^wrapper args:.* -d .*baz' baz.log + +: diff --git a/tests/specflg8.test b/tests/specflg8.test index 1abcaa2..79daa15 100755 =2D-- a/tests/specflg8.test +++ b/tests/specflg8.test @@ -1,5 +1,5 @@ #! /bin/sh =2D# Copyright (C) 2002, 2004 Free Software Foundation, Inc. +# Copyright (C) 2002, 2004, 2011 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -34,25 +34,18 @@ END # different flags. =20 cat > Makefile.am << 'END' =2DFALSESOURCE =3D false.c +TRUESOURCE =3D true.c bin_PROGRAMS =3D false true =2Dtrue_SOURCES =3D $(FALSESOURCE) =2Dtrue_CPPFLAGS =3D -DAM_TRUE =2Dfalse_SOURCES =3D $(FALSESOURCE) =2Dfalse_CPPFLAGS =3D -DAM_FALSE +true_SOURCES =3D $(TRUESOURCE) +true_CPPFLAGS =3D -DEXIT_CODE=3D0 +false_SOURCES =3D $(TRUESOURCE) +false_CPPFLAGS =3D -DEXIT_CODE=3D1 END =20 =2Dcat > false.c << 'END' =2D#include =2Dint =2Dmain (int argc, char *argv[]) +cat > true.c << 'END' +int main (void) { =2D#ifdef AM_TRUE =2D puts ("true"); =2D#else =2D puts ("false"); =2D#endif =2D return 0; + return EXIT_CODE; } END =20 @@ -62,5 +55,11 @@ $AUTOMAKE -a =20 ./configure $MAKE =2D./true | grep true =2D./false | grep false + +./true +./false && Exit 1 + +test -f ./true-true.o +test -f ./true-true.o + +: diff --git a/tests/tests-environment-backcompat.test b/tests/tests-environm= ent-backcompat.test new file mode 100755 index 0000000..6749bc2 =2D-- /dev/null +++ b/tests/tests-environment-backcompat.test @@ -0,0 +1,65 @@ +#! /bin/sh +# Copyright (C) 2011 Free Software Foundation, Inc. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# With old serial testsuite driver, TESTS_ENVIRONMENT can be used to +# define the "test runner", i.e. the program that the test scripts must +# be run by (with the parallel-tests driver one should use LOG_COMPILER +# for this). The behaviour tested here is also documented in the manual. + +parallel_tests=3Dno +. ./defs || Exit 1 + +set -e + +cat >> configure.in < Makefile.am << 'END' +TESTS_ENVIRONMENT =3D $(PERL) -Mstrict -w +TESTS =3D foo.pl bar.pl baz.pl +XFAIL_TESTS =3D baz.pl +EXTRA_DIST =3D $(TESTS) +END + +echo 'exit (0);' > foo.pl +echo 'exit (0);' > bar.pl + +cat > baz.pl << 'END' +# With "use strict" enacted, this will cause an error, since the +# variable `$x' is not declared with `my' nor specified with an +# explicit package name. +$x =3D 0; +exit ($x); +END + +cat > baz.pl << 'END' +exit (1); +END + +chmod a+x *.pl + +$ACLOCAL +$AUTOCONF +$AUTOMAKE -a + +./configure + +$MAKE check +$MAKE distcheck + +: diff --git a/tests/txinfo21.test b/tests/txinfo21.test index 5644c0b..ae1d985 100755 =2D-- a/tests/txinfo21.test +++ b/tests/txinfo21.test @@ -118,8 +118,8 @@ test ! -f rec/main3.html =20 # Make sure AM_MAKEINFOHTMLFLAGS is supported, and override AM_MAKEINFO. cat >>Makefile.am <<\EOF =2DAM_MAKEINFOHTMLFLAGS=3D--no-split =2DAM_MAKEINFOFLAGS=3D--unsupported-option +AM_MAKEINFOHTMLFLAGS =3D --no-headers --no-split +AM_MAKEINFOFLAGS =3D --unsupported-option EOF $AUTOMAKE ./configure --prefix "`pwd`" =2D-=20 1.7.2.3 --Boundary-00=_p/PDOcm2stzXieS-- From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 01 04:11:02 2011 Received: (at 8969) by debbugs.gnu.org; 1 Jul 2011 08:11:02 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcYoX-0001r8-P7 for submit@debbugs.gnu.org; Fri, 01 Jul 2011 04:11:02 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcYoV-0001qu-IW for 8969@debbugs.gnu.org; Fri, 01 Jul 2011 04:11:00 -0400 Received: by wyj26 with SMTP id 26so2085780wyj.3 for <8969@debbugs.gnu.org>; Fri, 01 Jul 2011 01:10:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=VVhutZhMlmadGpAe2pkkONcpb7lryJ0UqaUvkeKIEE8=; b=sy3V31L45qZL5TQ0vcrYkQNj8S67mrLrLqTzit7AeSL6pADbzMtOGWTrJoKMQ6GE7+ 6XQfIQPJNXkejKz2de68wAlnnj0wnBYIR6gNpkfMyWnhigooNLF9HqmGd11/X7tGKhdj odiWvLIinniaNm5q3EESwafiCqO+28uB0IChU= Received: by 10.227.167.129 with SMTP id q1mr2611652wby.101.1309507853640; Fri, 01 Jul 2011 01:10:53 -0700 (PDT) Received: from bigio.localnet (host54-48-dynamic.58-82-r.retail.telecomitalia.it [82.58.48.54]) by mx.google.com with ESMTPS id d19sm2165213wbh.42.2011.07.01.01.10.51 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Jul 2011 01:10:52 -0700 (PDT) From: Stefano Lattarini To: 8969@debbugs.gnu.org Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases Date: Fri, 1 Jul 2011 10:10:43 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201107010039.13579.stefano.lattarini@gmail.com> <201107010059.53804.stefano.lattarini@gmail.com> In-Reply-To: <201107010059.53804.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201107011010.43620.stefano.lattarini@gmail.com> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 8969 Cc: automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.0 (----) On Friday 01 July 2011, Stefano Lattarini wrote: > On Friday 01 July 2011, Stefano Lattarini wrote: > > I'll soon post a patch that improves the synchronization between > > some examples from the manual and some test cases. In the process > > of writing it, I've noticed that various non-trivial examples from > > the manual are not tested; and while I've remedied to part of this > > problem with my patch, a lot remains to be done; so I'm opening > > this bug to avoid forgetting about the issue. > > > And here it is the promised patch. I will push in 72 hours if there > is no objection by then. > Oops, one of the "amhello" tests has an unecessary requirement (copy & paste blunder). Consider the following squashed in: diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test index 8da3495..47add73 100755 --- a/tests/amhello-binpkg.test +++ b/tests/amhello-binpkg.test @@ -17,7 +17,6 @@ # Document an example from the manual about the `amhello' package: # using DESDIR to build simple, no-frills binary packages. -required=i586-mingw32msvc-gcc . ./defs || Exit 1 set -e From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 01 05:14:26 2011 Received: (at submit) by debbugs.gnu.org; 1 Jul 2011 09:14:26 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcZnt-0003FU-Tm for submit@debbugs.gnu.org; Fri, 01 Jul 2011 05:14:26 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QcZnr-0003FG-O6 for submit@debbugs.gnu.org; Fri, 01 Jul 2011 05:14:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcZng-0004TN-JY for submit@debbugs.gnu.org; Fri, 01 Jul 2011 05:14:17 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:57457) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcZng-0004T5-6k for submit@debbugs.gnu.org; Fri, 01 Jul 2011 05:14:12 -0400 Received: from eggs.gnu.org ([140.186.70.92]:60828) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcZne-0003zJ-6a for bug-automake@gnu.org; Fri, 01 Jul 2011 05:14:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QcZna-0004S1-Fh for bug-automake@gnu.org; Fri, 01 Jul 2011 05:14:09 -0400 Received: from smtp.mppmu.mpg.de ([134.107.24.58]:44932) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QcZnV-0004Qz-It; Fri, 01 Jul 2011 05:14:01 -0400 Received: by smtp.mppmu.mpg.de (Postfix, from userid 998) id 39F822828440; Fri, 1 Jul 2011 11:13:58 +0200 (CEST) Received: from mail.mppmu.mpg.de (mail-6.mppmu.mpg.de [134.107.6.12]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.mppmu.mpg.de (Postfix) with ESMTP id 0F938282834F; Fri, 1 Jul 2011 11:13:50 +0200 (CEST) Received: from pcl321.mppmu.mpg.de (pcl321.mppmu.mpg.de [134.107.3.54]) by mail.mppmu.mpg.de (Postfix) with ESMTP id BF7011A1288; Fri, 1 Jul 2011 11:13:49 +0200 (CEST) Received: from pcl321.mppmu.mpg.de (localhost [127.0.0.1]) by pcl321.mppmu.mpg.de (8.14.2/8.14.1) with ESMTP id p619Dna8018696; Fri, 1 Jul 2011 11:13:49 +0200 Received: from localhost (peb@localhost) by pcl321.mppmu.mpg.de (8.14.2/8.14.2/Submit) with ESMTP id p619DnXW018691; Fri, 1 Jul 2011 11:13:49 +0200 X-Authentication-Warning: pcl321.mppmu.mpg.de: peb owned process doing -bs Date: Fri, 1 Jul 2011 11:13:49 +0200 (CEST) From: Peter Breitenlohner To: Stefano Lattarini Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases In-Reply-To: <201107011010.43620.stefano.lattarini@gmail.com> Message-ID: References: <201107010039.13579.stefano.lattarini@gmail.com> <201107010059.53804.stefano.lattarini@gmail.com> <201107011010.43620.stefano.lattarini@gmail.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -6.3 (------) X-Debbugs-Envelope-To: submit Cc: 8969@debbugs.gnu.org, owner@debbugs.gnu.org, bug-automake@gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.3 (------) On Fri, 1 Jul 2011, Stefano Lattarini wrote: > Oops, one of the "amhello" tests has an unecessary requirement (copy & > paste blunder). Consider the following squashed in: > > diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test > index 8da3495..47add73 100755 > --- a/tests/amhello-binpkg.test > +++ b/tests/amhello-binpkg.test > @@ -17,7 +17,6 @@ > # Document an example from the manual about the `amhello' package: > # using DESDIR to build simple, no-frills binary packages. Hi Stefano, could this be a typo (DESDIR vs DESTDIR)? Regards Peter Breitenlohner From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 01 05:34:45 2011 Received: (at 8969) by debbugs.gnu.org; 1 Jul 2011 09:34:45 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qca7Z-0003iI-8B for submit@debbugs.gnu.org; Fri, 01 Jul 2011 05:34:45 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qca7X-0003i7-RS for 8969@debbugs.gnu.org; Fri, 01 Jul 2011 05:34:44 -0400 Received: by wwf25 with SMTP id 25so3007670wwf.15 for <8969@debbugs.gnu.org>; Fri, 01 Jul 2011 02:34:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=xnN1qWPrmqLeAHmkfx98yncoqtpL/GJhKtIFiUc0fkA=; b=vHMb8kOoawgjDZhPno4G9/tan3i05qpBJ1urfDkWwAdWnuWpssKBqXgFj8HmdrERou 6t6vU0KYw+n7ilUycUGURYLHrOeLwVMr3OZXxBRtrRwNhU6jFoqaKac1q1Y4Y79PwTQd fdMT3K0V1gF2WIjie8tEPLOx+Vgf5wxrhPS+o= Received: by 10.227.205.144 with SMTP id fq16mr2708218wbb.6.1309512877982; Fri, 01 Jul 2011 02:34:37 -0700 (PDT) Received: from bigio.localnet (host54-48-dynamic.58-82-r.retail.telecomitalia.it [82.58.48.54]) by mx.google.com with ESMTPS id b13sm2220154wbh.7.2011.07.01.02.34.35 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 01 Jul 2011 02:34:36 -0700 (PDT) From: Stefano Lattarini To: Peter Breitenlohner Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases Date: Fri, 1 Jul 2011 11:34:26 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201107011010.43620.stefano.lattarini@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201107011134.27660.stefano.lattarini@gmail.com> X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: 8969 Cc: 8969@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) Hello Peter. On Friday 01 July 2011, Peter Breitenlohner wrote: > On Fri, 1 Jul 2011, Stefano Lattarini wrote: > > > Oops, one of the "amhello" tests has an unecessary requirement (copy & > > paste blunder). Consider the following squashed in: > > > > diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test > > index 8da3495..47add73 100755 > > --- a/tests/amhello-binpkg.test > > +++ b/tests/amhello-binpkg.test > > @@ -17,7 +17,6 @@ > > # Document an example from the manual about the `amhello' package: > > # using DESDIR to build simple, no-frills binary packages. > > Hi Stefano, > > could this be a typo (DESDIR vs DESTDIR)? > Yes it is; fixed now. Thanks for spotting it! And since we are out to hunt typos, all the new amhello tests have the same error in the heading descriptions, using: "Document an example from the manual about the `amhello' package:" where this should be used instead: "Test an example from the manual about the `amhello' package:" Consider these fixed too. Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Sun Jul 03 09:49:41 2011 Received: (at 8969) by debbugs.gnu.org; 3 Jul 2011 13:49:41 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdN3M-0007bi-PT for submit@debbugs.gnu.org; Sun, 03 Jul 2011 09:49:41 -0400 Received: from mail-wy0-f172.google.com ([74.125.82.172]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QdN3K-0007bW-Kt for 8969@debbugs.gnu.org; Sun, 03 Jul 2011 09:49:39 -0400 Received: by wyj26 with SMTP id 26so3043253wyj.3 for <8969@debbugs.gnu.org>; Sun, 03 Jul 2011 06:49:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=MfjYgnB43AcIb1M7mZsuBdsJk4FZ34LHSbswXGMYVa0=; b=jfi7qyFLCQ+0D19Lqvfd5WKdJmnIlk8m407vL2VWYyCI717kzXpy12l6N51SfF4SqC 5Fp5XyFYT/jSaNnvz7lxkFMdi2TKRBX5dPznCvMkARQAUZUhx11YFa4WXP1PoQXzAQhR kNHGwABkdogpPi1YEUDS+CTZWoOjfCFlt10Ds= Received: by 10.227.10.210 with SMTP id q18mr4535116wbq.44.1309700972797; Sun, 03 Jul 2011 06:49:32 -0700 (PDT) Received: from bigio.localnet (host135-10-dynamic.13-87-r.retail.telecomitalia.it [87.13.10.135]) by mx.google.com with ESMTPS id e11sm1511822wbh.19.2011.07.03.06.49.30 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 03 Jul 2011 06:49:31 -0700 (PDT) From: Stefano Lattarini To: Peter Breitenlohner Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases Date: Sun, 3 Jul 2011 15:49:21 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201107011134.27660.stefano.lattarini@gmail.com> In-Reply-To: <201107011134.27660.stefano.lattarini@gmail.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201107031549.22543.stefano.lattarini@gmail.com> X-Spam-Score: -3.8 (---) X-Debbugs-Envelope-To: 8969 Cc: 8969@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.8 (---) On Friday 01 July 2011, Stefano Lattarini wrote: > Hello Peter. > > On Friday 01 July 2011, Peter Breitenlohner wrote: > > On Fri, 1 Jul 2011, Stefano Lattarini wrote: > > > > > Oops, one of the "amhello" tests has an unecessary requirement (copy & > > > paste blunder). Consider the following squashed in: > > > > > > diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test > > > index 8da3495..47add73 100755 > > > --- a/tests/amhello-binpkg.test > > > +++ b/tests/amhello-binpkg.test > > > @@ -17,7 +17,6 @@ > > > # Document an example from the manual about the `amhello' package: > > > # using DESDIR to build simple, no-frills binary packages. > > > > Hi Stefano, > > > > could this be a typo (DESDIR vs DESTDIR)? > > > Yes it is; fixed now. Thanks for spotting it! > > And since we are out to hunt typos, all the new amhello tests have the > same error in the heading descriptions, using: > "Document an example from the manual about the `amhello' package:" > where this should be used instead: > "Test an example from the manual about the `amhello' package:" > Consider these fixed too. > > Thanks, > Stefano > I've applied this patch to maint, merged maint into master, merged master into testsuite-work, and pushed. Regards, Stefano From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 02:40:21 2011 Received: (at 8969) by debbugs.gnu.org; 6 Jul 2011 06:40:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeLmX-0002W7-E4 for submit@debbugs.gnu.org; Wed, 06 Jul 2011 02:40:21 -0400 Received: from mailout-de.gmx.net ([213.165.64.23]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QeLmT-0002Vs-ND for 8969@debbugs.gnu.org; Wed, 06 Jul 2011 02:40:19 -0400 Received: (qmail 31779 invoked by uid 0); 6 Jul 2011 06:40:11 -0000 Received: from 77.58.247.232 by www013.gmx.net with HTTP; Wed, 06 Jul 2011 08:40:10 +0200 (CEST) Content-Type: text/plain; charset="utf-8" Date: Wed, 06 Jul 2011 08:40:10 +0200 From: "Ralf Wildenhues" In-Reply-To: <201107010059.53804.stefano.lattarini@gmail.com> Message-ID: <20110706064010.311420@gmx.net> MIME-Version: 1.0 References: <20110628203727.158570@gmx.net> <201107010039.13579.stefano.lattarini@gmail.com> <201107010059.53804.stefano.lattarini@gmail.com> Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases To: Stefano Lattarini X-Authenticated: #13673931 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Mutt-Fcc: ~/Mail/outbox X-Mutt-References: <201107010059.53804.stefano.lattarini@gmail.com> X-Priority: 3 X-Provags-ID: V01U2FsdGVkX1+2fCNMMdO2KLyyT+r8LFh0WAsQu50T7BSoiUkd82 uCQiRkRmEDN6v8atcM2h155Kuan4dYN/d0sQ== Content-Transfer-Encoding: 8bit X-GMX-UID: eHkhJs0TZDIrLaWWqmY2jeF5emhmY4Hu X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8969 Cc: 8969@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) * Stefano Lattarini wrote on Fri, Jul 01, 2011 at 12:59:53AM CEST: > Subject: [PATCH] docs, tests: synchronize examples from docs to tests > > * tests/README (Writing test cases): Give suggestions on how to > keep test cases and examples in the documentation synchronized. > * doc/automake.texi: Improve or fix existing testcase-referencing > comments, and add many new ones. > * HACKING (Administrivia): Suggest to test complex examples and > idioms from the manual. > * tests/specflg8.test: Improve synchronization with the example > in the manual. > * tests/output11.test:Likewise. > * tests/txinfo21.test:Likewise. > * tests/interp.test: Likewise. Since we are at it, and enable > the `errexit' shell flag, do related changes, and add trailing > `:'command. > * tests/amhello-cflags.test: New test. > * tests/amhello-cross-compile.test: Likewise. > * tests/amhello-binpkg.test: Likewise. > * tests/tests-environment-backcompat: Likewise. > * tests/parallel-tests-log-compiler-example.test: Likewise. > * tests/Makefile.am (TESTS): Update. > --- /dev/null > +++ b/tests/amhello-binpkg.test > @@ -0,0 +1,44 @@ > +# Document an example from the manual about the `amhello' package: > +# using DESDIR to build simple, no-frills binary packages. (DESTDIR was already fixed IIUC) > +required=i586-mingw32msvc-gcc > +. ./defs || Exit 1 > + > +set -e > + > +cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ > + || fatal_ "cannot get amhello tarball" > + > +tar zxf amhello-1.0.tar.gz The z flag is not portable to all tars, the portable spelling is gzip -dc amhello-1.0.tar.gz | tar xf - (several instances). I'm ok with fixing the manual also, although it's usually clear for people still having to use those vendor tars (and inconvenient for the rest). > +cd amhello-1.0 > + > +./configure --prefix /usr > +make > +make DESTDIR="`pwd`/inst" install > +cd inst > +find . -type f -print > ../files.lst > +tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > t > +LC_ALL=C sort t > tar.got > + > +diff - tar.got <<'END' > +./usr/bin/hello > +./usr/share/doc/amhello/README > +END [...] Nice patch btw! Thanks, Ralf From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 04:33:19 2011 Received: (at 8969) by debbugs.gnu.org; 6 Jul 2011 08:33:19 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeNXq-0006f6-Af for submit@debbugs.gnu.org; Wed, 06 Jul 2011 04:33:18 -0400 Received: from mail-ww0-f46.google.com ([74.125.82.46]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeNXn-0006eu-DC for 8969@debbugs.gnu.org; Wed, 06 Jul 2011 04:33:16 -0400 Received: by wwf25 with SMTP id 25so6411515wwf.15 for <8969@debbugs.gnu.org>; Wed, 06 Jul 2011 01:33:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:message-id; bh=HtOY80S5pLcpoeFjt/N5/0Expmf8jZ/vLDDarHDFkWA=; b=snLVefqoYVPNTuaN02G4rHsCo/Na6m+qfsEu4nwW47bk6PjopFaqVfKzCWYswtNpJe PSa8Wd0X18QDlRmY2L/xNlFRM00f03NT0mUogtGoxmOp5EZoZe3a+1kyx7C9L6qehK9/ e3PfRIsPPOJNgvhgzW7qNmZahSXeN9gmBNg+M= Received: by 10.227.43.9 with SMTP id u9mr7088483wbe.74.1309941189530; Wed, 06 Jul 2011 01:33:09 -0700 (PDT) Received: from bigio.localnet (host3-49-dynamic.58-82-r.retail.telecomitalia.it [82.58.49.3]) by mx.google.com with ESMTPS id c17sm5889616wbh.46.2011.07.06.01.33.07 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 06 Jul 2011 01:33:08 -0700 (PDT) From: Stefano Lattarini To: "Ralf Wildenhues" Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases Date: Wed, 6 Jul 2011 10:32:56 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201107010059.53804.stefano.lattarini@gmail.com> <20110706064010.311420@gmx.net> In-Reply-To: <20110706064010.311420@gmx.net> MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_52BFO8mWIcTZeh7" Message-Id: <201107061032.57264.stefano.lattarini@gmail.com> X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 8969 Cc: 8969@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) --Boundary-00=_52BFO8mWIcTZeh7 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit On Wednesday 06 July 2011, Ralf Wildenhues wrote: > * Stefano Lattarini wrote on Fri, Jul 01, 2011 at 12:59:53AM CEST: > > Subject: [PATCH] docs, tests: synchronize examples from docs to tests > > > > * tests/README (Writing test cases): Give suggestions on how to > > keep test cases and examples in the documentation synchronized. > > * doc/automake.texi: Improve or fix existing testcase-referencing > > comments, and add many new ones. > > * HACKING (Administrivia): Suggest to test complex examples and > > idioms from the manual. > > * tests/specflg8.test: Improve synchronization with the example > > in the manual. > > * tests/output11.test:Likewise. > > * tests/txinfo21.test:Likewise. > > * tests/interp.test: Likewise. Since we are at it, and enable > > the `errexit' shell flag, do related changes, and add trailing > > `:'command. > > * tests/amhello-cflags.test: New test. > > * tests/amhello-cross-compile.test: Likewise. > > * tests/amhello-binpkg.test: Likewise. > > * tests/tests-environment-backcompat: Likewise. > > * tests/parallel-tests-log-compiler-example.test: Likewise. > > * tests/Makefile.am (TESTS): Update. > > > > --- /dev/null > > +++ b/tests/amhello-binpkg.test > > @@ -0,0 +1,44 @@ > > > +# Document an example from the manual about the `amhello' package: > > +# using DESDIR to build simple, no-frills binary packages. > > (DESTDIR was already fixed IIUC) > > > +required=i586-mingw32msvc-gcc > > +. ./defs || Exit 1 > > + > > +set -e > > + > > +cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ > > + || fatal_ "cannot get amhello tarball" > > + > > +tar zxf amhello-1.0.tar.gz > > The z flag is not portable to all tars, the portable spelling is > gzip -dc amhello-1.0.tar.gz | tar xf - > > (several instances). > Oops, sorry. Fixed by the attached patch. OK for maint? I'll wait the customary 72 hours before pushing. > I'm ok with fixing the manual also, although it's > usually clear for people still having to use those vendor tars (and > inconvenient for the rest). > Yes, I'd say we leave the examples in manual untouched. Agreed? > > +cd amhello-1.0 > > + > > +./configure --prefix /usr > > +make > > +make DESTDIR="`pwd`/inst" install > > +cd inst > > +find . -type f -print > ../files.lst > > +tar cvf amhello-1.0-i686.tar.gz `cat ../files.lst` > t > > +LC_ALL=C sort t > tar.got > > + > > +diff - tar.got <<'END' > > +./usr/bin/hello > > +./usr/share/doc/amhello/README > > +END > [...] > > Nice patch btw! > Thanks :-) Regards, Stefano --Boundary-00=_52BFO8mWIcTZeh7 Content-Type: text/x-patch; charset="utf-8"; name="0001-tests-portability-fixes-in-tests-on-amhello-examples.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline; filename="0001-tests-portability-fixes-in-tests-on-amhello-examples.patch" =46rom d7e03b029b3ae322ed719ef501810d7334eaf288 Mon Sep 17 00:00:00 2001 Message-Id: =46rom: Stefano Lattarini Date: Wed, 6 Jul 2011 10:31:03 +0200 Subject: [PATCH] tests: portability fixes in tests on amhello examples * tests/amhello-binpkg.test: Don't use "tar xzf too.tag.gz" to extract a gzip-compressed tarball, that's unportable to some tar implementations; use the "gzip -dc fo.tar.gz | tar xf -" idiom instead. * tests/amhello-cflags.test: Likewise. * tests/amhello-cross-compile.test: Likewise. Suggestion from Ralf Wildenhues. =2D-- ChangeLog | 11 +++++++++++ tests/amhello-binpkg.test | 3 ++- tests/amhello-cflags.test | 4 +++- tests/amhello-cross-compile.test | 3 ++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c77326d..c6f8d05 100644 =2D-- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2011-07-06 Stefano Lattarini + + tests: portability fixes in tests on amhello examples + * tests/amhello-binpkg.test: Don't use "tar xzf too.tag.gz" to + extract a gzip-compressed tarball, that's unportable to some + tar implementations; use the "gzip -dc fo.tar.gz | tar xf -" + idiom instead. + * tests/amhello-cflags.test: Likewise. + * tests/amhello-cross-compile.test: Likewise. + Suggestion from Ralf Wildenhues. + 2011-07-01 Stefano Lattarini =20 docs, tests: synchronize examples from docs to tests diff --git a/tests/amhello-binpkg.test b/tests/amhello-binpkg.test index 8085a23..951f713 100755 =2D-- a/tests/amhello-binpkg.test +++ b/tests/amhello-binpkg.test @@ -24,7 +24,8 @@ set -e cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ || fatal_ "cannot get amhello tarball" =20 =2Dtar zxf amhello-1.0.tar.gz +# "tar zxf" in unportable to some tar implementations. +gzip -dc amhello-1.0.tar.gz | tar xf - cd amhello-1.0 =20 ./configure --prefix /usr diff --git a/tests/amhello-cflags.test b/tests/amhello-cflags.test index 1c3e516..25b0a52 100755 =2D-- a/tests/amhello-cflags.test +++ b/tests/amhello-cflags.test @@ -26,8 +26,10 @@ set -e cp "$testsrcdir"/../doc/amhello-1.0.tar.gz . \ || fatal_ "cannot get amhello tarball" =20 =2Dtar zxf amhello-1.0.tar.gz +# "tar zxf" in unportable to some tar implementations. +gzip -dc amhello-1.0.tar.gz | tar xf - cd amhello-1.0 + mkdir debug optim cd debug ../configure CFLAGS=3D'-g -O0' diff --git a/tests/amhello-cross-compile.test b/tests/amhello-cross-compile= =2Etest index 862a079..7c05fc0 100755 =2D-- a/tests/amhello-cross-compile.test +++ b/tests/amhello-cross-compile.test @@ -30,7 +30,8 @@ build=3D`"$testsrcdir"/../lib/config.guess` && test -n "$= build" \ || fatal_ "cannot guess build platform" case $build in *mingw*) skip_ "build system is MinGW too";; esac =20 =2Dtar zxf amhello-1.0.tar.gz +# "tar zxf" in unportable to some tar implementations. +gzip -dc amhello-1.0.tar.gz | tar xf - cd amhello-1.0 =20 ./configure --build "$build" --host "$host" > stdout \ =2D-=20 1.7.2.3 --Boundary-00=_52BFO8mWIcTZeh7-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jul 06 15:53:59 2011 Received: (at 8969) by debbugs.gnu.org; 6 Jul 2011 19:53:59 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QeYAZ-0004AR-7A for submit@debbugs.gnu.org; Wed, 06 Jul 2011 15:53:59 -0400 Received: from mailout-de.gmx.net ([213.165.64.22]) by debbugs.gnu.org with smtp (Exim 4.69) (envelope-from ) id 1QeYAW-0004A9-Lu for 8969@debbugs.gnu.org; Wed, 06 Jul 2011 15:53:57 -0400 Received: (qmail 7098 invoked by uid 0); 6 Jul 2011 19:53:50 -0000 Received: from 77.58.247.232 by www023.gmx.net with HTTP; Wed, 06 Jul 2011 21:53:49 +0200 (CEST) Content-Type: text/plain; charset="utf-8" Date: Wed, 06 Jul 2011 21:53:49 +0200 From: "Ralf Wildenhues" In-Reply-To: <201107061032.57264.stefano.lattarini@gmail.com> Message-ID: <20110706195349.176130@gmx.net> MIME-Version: 1.0 References: <201107010059.53804.stefano.lattarini@gmail.com> <20110706064010.311420@gmx.net> <201107061032.57264.stefano.lattarini@gmail.com> Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases To: Stefano Lattarini X-Authenticated: #13673931 X-Flags: 0001 X-Mailer: WWW-Mail 6100 (Global Message Exchange) X-Mutt-Fcc: ~/Mail/outbox X-Mutt-References: <201107061032.57264.stefano.lattarini@gmail.com> X-Priority: 3 X-Provags-ID: V01U2FsdGVkX19L4QNxUItLBZdLrhWEbMkzGyA6ClH3VFm2ndOm7P 41gKophIeTt2jQSz00qb1dzueM/a2WVAN4ZQ== Content-Transfer-Encoding: 8bit X-GMX-UID: f4Qse/E3bmwoVrnXuDdLOiJPUzc4chH2 X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8969 Cc: 8969@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) * Stefano Lattarini wrote on Wed, Jul 06, 2011 at 10:32:56AM CEST: > Oops, sorry. Fixed by the attached patch. OK for maint? I'll wait > the customary 72 hours before pushing. Thanks. OK, but please remove all the comments about tar unportability in the tests. It's so obvious. ;-) (and there are probably a dozen other places in the Automake source tree that you'd have to put the comment at as well, for any amount of consistency. I think having one comment, the one that already exists in lib/am/distdir.am, is fully sufficient.) > > I'm ok with fixing the manual also, although it's > > usually clear for people still having to use those vendor tars (and > > inconvenient for the rest). > > > Yes, I'd say we leave the examples in manual untouched. Agreed? OK. > Subject: [PATCH] tests: portability fixes in tests on amhello examples > > * tests/amhello-binpkg.test: Don't use "tar xzf too.tag.gz" to > extract a gzip-compressed tarball, that's unportable to some > tar implementations; use the "gzip -dc fo.tar.gz | tar xf -" > idiom instead. > * tests/amhello-cflags.test: Likewise. > * tests/amhello-cross-compile.test: Likewise. Thanks, Ralf From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 08 03:59:20 2011 Received: (at 8969) by debbugs.gnu.org; 8 Jul 2011 07:59:21 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf5y3-0004nu-Q3 for submit@debbugs.gnu.org; Fri, 08 Jul 2011 03:59:20 -0400 Received: from mail-ww0-f42.google.com ([74.125.82.42]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Qf5y1-0004nN-HE for 8969@debbugs.gnu.org; Fri, 08 Jul 2011 03:59:18 -0400 Received: by wwg11 with SMTP id 11so355910wwg.3 for <8969@debbugs.gnu.org>; Fri, 08 Jul 2011 00:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:subject:date:user-agent:cc:references:in-reply-to :mime-version:content-type:content-transfer-encoding:message-id; bh=RuI19BS7GLzD7nEpM7fnNZ6QJ9iElTK311xIN3Xhy6A=; b=ocg9SmCbQBBc/8+zO/7umvdlnkwKf7GVuUuAGyyTcY5O+Ao6abcsuEAnLtJAHBJryo O6AATyuadNb2OhAPB832ua4SikP/Relb0SG5KoVTjCaJo5mQsXq2+JCbkrsOKvJLWr4t CP+mFVSUbinrq7UJFIEJAdpLwrgCYVHu8lNOU= Received: by 10.216.157.202 with SMTP id o52mr396401wek.2.1310111949833; Fri, 08 Jul 2011 00:59:09 -0700 (PDT) Received: from bigio.localnet (host220-38-dynamic.56-82-r.retail.telecomitalia.it [82.56.38.220]) by mx.google.com with ESMTPS id w8sm5188326wec.24.2011.07.08.00.59.07 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 08 Jul 2011 00:59:08 -0700 (PDT) From: Stefano Lattarini To: "Ralf Wildenhues" Subject: Re: bug#8969: improve synchronization between examples in the manual and test cases Date: Fri, 8 Jul 2011 09:58:58 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; ) References: <201107061032.57264.stefano.lattarini@gmail.com> <20110706195349.176130@gmx.net> In-Reply-To: <20110706195349.176130@gmx.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201107080958.58913.stefano.lattarini@gmail.com> X-Spam-Score: -3.9 (---) X-Debbugs-Envelope-To: 8969 Cc: 8969@debbugs.gnu.org, automake-patches@gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.9 (---) On Wednesday 06 July 2011, Ralf Wildenhues wrote: > * Stefano Lattarini wrote on Wed, Jul 06, 2011 at 10:32:56AM CEST: > > Oops, sorry. Fixed by the attached patch. OK for maint? I'll wait > > the customary 72 hours before pushing. > > Thanks. OK, but please remove all the comments about tar unportability > in the tests. It's so obvious. ;-) > OK done. > (and there are probably a dozen other places in the Automake source tree > that you'd have to put the comment at as well, for any amount of > consistency. I think having one comment, the one that already exists in > lib/am/distdir.am, is fully sufficient.) > > > > I'm ok with fixing the manual also, although it's > > > usually clear for people still having to use those vendor tars (and > > > inconvenient for the rest). > > > > > Yes, I'd say we leave the examples in manual untouched. Agreed? > > OK. > > > Subject: [PATCH] tests: portability fixes in tests on amhello examples > > > > * tests/amhello-binpkg.test: Don't use "tar xzf too.tag.gz" to > > extract a gzip-compressed tarball, that's unportable to some > > tar implementations; use the "gzip -dc fo.tar.gz | tar xf -" > > idiom instead. > > * tests/amhello-cflags.test: Likewise. > > * tests/amhello-cross-compile.test: Likewise. > > Thanks, > Ralf > Pushed now. Thanks, Stefano From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 09 08:11:03 2013 Received: (at 8969-done) by debbugs.gnu.org; 9 Jan 2013 13:11:03 +0000 Received: from localhost ([127.0.0.1]:58064 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsvQt-000872-DA for submit@debbugs.gnu.org; Wed, 09 Jan 2013 08:11:03 -0500 Received: from mail-la0-f45.google.com ([209.85.215.45]:54162) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1TsvQq-00086V-Kj for 8969-done@debbugs.gnu.org; Wed, 09 Jan 2013 08:11:01 -0500 Received: by mail-la0-f45.google.com with SMTP id ep20so1799056lab.4 for <8969-done@debbugs.gnu.org>; Wed, 09 Jan 2013 05:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:message-id:date:from:mime-version:to:subject :content-type:content-transfer-encoding; bh=mvK4KhnrI0GIPk0lKtwX5XRGFiQutSEeR6zTu9WXocM=; b=tmWprToSX5AHmFheDjD94p2zHbYDQlQzYbMnFnD5KuafoF3r9JmZi6VzCK+KuIR31w 4Tbq0HKDdxYSgjR/uCfkSFDAYSSp+WUvG4LxDO0di5umSd10/vu23MvxRRNSolFMxTFy 4+a1cmS8AhP3lDLVbvdFpwgUmuV5bfvA2YV0WfgBS+VOa/iizv3UiVdSCG/HK+QuM+xY 88MGJ8THwLm2R9qpYZ+Qjioj1f7V8/DxOn/VKFSy4ZuzQ+yeN5RX0rCqC7ccRrr/jK5C adAb41dolvXNgODST3Wudntw2nMK665Iao9W6umMb0sgnOP31nR36qHxEALq5PGTSw4/ dKYQ== X-Received: by 10.152.109.238 with SMTP id hv14mr6762377lab.30.1357737044848; Wed, 09 Jan 2013 05:10:44 -0800 (PST) Received: from [192.168.178.21] (host137-94-dynamic.4-87-r.retail.telecomitalia.it. [87.4.94.137]) by mx.google.com with ESMTPS id hn3sm2118473lab.10.2013.01.09.05.10.43 (version=SSLv3 cipher=OTHER); Wed, 09 Jan 2013 05:10:43 -0800 (PST) Message-ID: <50ED6C51.1030107@gmail.com> Date: Wed, 09 Jan 2013 14:10:41 +0100 From: Stefano Lattarini MIME-Version: 1.0 To: 8969-done@debbugs.gnu.org Subject: close bug 8969 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: 0.1 (/) X-Debbugs-Envelope-To: 8969-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: 0.1 (/) Reference: One and a half year ago, I wrote : > I'll soon post a patch that improves the synchronization between > some examples from the manual and some test cases. In the process > of writing it, I've noticed that various non-trivial examples from > the manual are not tested; and while I've remedied to part of this > problem with my patch, a lot remains to be done; so I'm opening > this bug to avoid forgetting about the issue. I now think that keeping a bug report open about this is overkill, and introduce more noise rather than helping out. So, since the referenced patch has been since long written and applied, and the issues originally spotted have been fixed, I'm closing the report. Regards, Stefano From unknown Sun Jun 22 07:32:42 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 07 Feb 2013 12:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator