automake
[Top][All Lists]
Advanced

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

Re: Several pass for a simple test in make check


From: Stefano Lattarini
Subject: Re: Several pass for a simple test in make check
Date: Sat, 17 Nov 2012 12:30:45 +0100

On 11/17/2012 11:26 AM, Alexis Praga wrote:
>>
>> A band-aid solution is to have a test script automatically generated for
>> each
>>  configuration you have to support.  This might also offer better
>> performances
>> with concurrent make (and if your per-configuration tests are not fast,
>> this
>> might indeed become the preferred solution).
>>
> I have thought about that, but the TESTS variable should contains around
> 400 files then.
> Is there a way to list such a large set of file automatically ?
>
You might write a script that generates both the tests and their
list, and have this list included in the Makefile.am.  Automake's
own build system do something similar in its bootstrap.sh script:

   # Create required makefile snippets.
   $PERL ./gen-testsuite-part > t/testsuite-part.tmp
   chmod a-w t/testsuite-part.tmp
   mv -f t/testsuite-part.tmp t/testsuite-part.am

You might want to peek at the Automake tarball for more details.

> AS wildcards are not supported by Automake, the only solution I see
> is to create a custom macro to set TESTS by doing a 'ls' in the
> adequate directory.
> 
You mean at configure runtime?  Like in:

  # in configure.ac
  all_tests=`cd $srcdir && echo *.test`
  AC_SUBST([all_tests)

  # in Makefile.am
  TESTS = @all_tests@

That would be feasible as well, but only if you use tests with the
'.test' suffix, or some other suffixes declared in TEST_EXTENSIONS
(this will allow Automake to produce correct rules even without
knowing the list of tests at automake runtime).

HTH,
  Stefano



reply via email to

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