[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [FYI] {maint} tests/README: update obsoleted advice
From: |
Ralf Wildenhues |
Subject: |
Re: [FYI] {maint} tests/README: update obsoleted advice |
Date: |
Sun, 22 May 2011 15:14:57 +0200 |
* Stefano Lattarini wrote on Fri, May 20, 2011 at 10:21:09PM CEST:
> * tests/README (Section "Writing test cases" subsection "Do"):
> Do not suggest to use the `*-p.test' pattern for the names of
> hand-written tests which use the `parallel-tests' Automake option.
> Not only is this not respected by the existing tests, but it is
> more likely to cause conflicts with auto-generated tests.
> So, suggest to *avoid* using the `*-p.test' pattern in names
> of hand-written tests instead.
> (Section "Writing test cases" subsection "Do not"): When
> suggesting not to override Makefile variables using command
> line arguments, do not use the badly outdated variables `U'
> and 'ANSI2KNR' in the example; instead, use the more common
> and typical `DESTDIR'.
Actually, this change has a slight technical error: when some variable
is never initialized in the Makefile, -e is not necessary in order to
override it. DESTDIR is such a variable: we ensure that we do not ever
initialize it. And as such, it is quite portable to use
make DESTDIR=/foo/bar install
and in fact, quite widely used.
Can we use some other variable as example? How about prefix?
Cheers,
Ralf
> --- a/tests/README
> +++ b/tests/README
> @@ -107,8 +107,8 @@ Do
>
> For tests that use the `parallel-tests' Automake option, set the shell
> variable `parallel_tests' to "yes" before including ./defs. Also,
> - use for them a name that ends in `-p.test' and does not clash with any
> - generated tests in the suite.
> + do not use for them a name that ends in `-p.test', since that would
> + risk to clash with automatically-generated tests.
>
> ./defs sets a skeleton configure.in. If possible, append to this
> file. In some cases you'll have to overwrite it, but this should
> @@ -177,12 +177,12 @@ Do not
> reason, but at least it makes sure the original error is still
> here.)
>
> - Do not override Makefile variables using make arguments, as in
> - $MAKE ANSI2KNR=./ansi2knr U=_ all
> - this is not portable for recursive targets (targets that
> - call a sub-make may not pass `ANSI2KNR=./ansi2knr U=_' along).
> - Use the following instead.
> - ANSI2KNR=./ansi2knr U=_ $MAKE -e all
> + Do not override Makefile variables using make arguments, as in e.g.:
> + $MAKE DESTDIR=/foo/bar install
> + This is not portable for recursive targets (targets that call a
> + sub-make may not pass `DESTDIR=/foo/bar' along). Use the following
> + instead:
> + DESTDIR=/foo/bar $MAKE -e install
>
> Do not send a test case without signing a copyright disclaimer.
> See http://sources.redhat.com/automake/contribute.html or