[Top][All Lists]

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

Re: texi2html tests are huge

From: Stefano Lattarini
Subject: Re: texi2html tests are huge
Date: Sun, 15 Jan 2012 10:47:56 +0100

Hi Patrice.

On 01/14/2012 11:22 PM, Patrice Dumas wrote:
> On Sun, Jan 08, 2012 at 09:23:16AM +0100, Stefano Lattarini wrote:
>>   $ cat Makefile.am
>>   basic_TESTS = foo.test bar.test
>>   more_TESTS = zardoz.test
>>   # Only the basic tests will be run by "make check" by default.
>>   TESTS = $(basic_TESTS)
>>   # But make it easy for the developers to run all the tests with
>>   # a simple "make check-all".
>>   all_TESTS = $(basic_TESTS) $(more_TESTS)
>>   check-all: all
>>      $(MAKE) $(AM_MAKEFLAGS) TESTS='$(all_TESTS)' check
> I used that, and it worked, but in a subdirectory there was a
> difficulty since TESTS has to be the same than in the parent
> directory.
Ouch, I hadn't understood that make recursion was involved :-(  Then
we need a different approach.

> So I use a wrapper script in the subdirectory.
> More precisely, in the parent directory the test script is
> long_tests.sh and in the Makefile.am there is:
>    long_TESTS = long_tests.sh
>    long-check: all
>            $(MAKE) $(AM_MAKEFLAGS) TESTS='$(long_TESTS)' check
> In the subdirectory (many_input_files/), the Makefile.am excerpt is
>    long_TESTS = tex_l2h.sh tex_t4ht.sh
>    long-check: all
>            $(MAKE) $(AM_MAKEFLAGS) TESTS='$(long_TESTS)' check
> with a wrapper script in the subdirectory, also called long_tests.sh
> which simply calls:
>    make long-test
Note that this won't respect the user selection of the make program though.
For example, if a NetBSD user decides to use GNU make to build and check

  $ ./configure MAKE=gmake && gmake && gmake check

your long_tests.sh script above won't respect his choice, and will probably
invoke the NetBSD make instead.

What I think is that the above workaround is too convoluted and too brittle.
The better way to proceed IMHO is to use an approach similar to what GNU
coreutils does; i.e., expensive tests are only run when a proper environment
variable, say 'RUN_EXPENSIVE_TESTS', is set to "yes" (and they are SKIP'd
otherwise).  So those tests won't be executed when a common user invokes
"make check", but you will be able to invoke them with a simple:

  RUN_EXPENSIVE_TESTS=yes make check

For more information, take a look at the coreutils Git repository, especially
the file 'tests/init.cfg'.

Also, sorry if I don't try to provide a patch, but:

  1. I haven't signed copyright papers for Texinfo, and I have no intention
     of going through all the back-and-forth snail-mail hoops again, only
     for a single patch.

  2. I'd rather stay away from CVS if I just can help it.

Hope that helps anyway,

reply via email to

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