autoconf
[Top][All Lists]
Advanced

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

Re: make test


From: Ralf Wildenhues
Subject: Re: make test
Date: Wed, 26 Jan 2011 20:45:24 +0100
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Eve-Marie,

* Eve-Marie Devaliere wrote on Wed, Jan 26, 2011 at 05:39:35PM CET:
> > http://www.gnu.org/software/automake/manual/automake.html#Tests
> Yes, Frank pointed me to that and I was just having a look... Thanks, I
> think this is what I am looking for.  I am still trying to figure out
> which 'Makefile.am' needs this and trying to find more example.... (I
> have 2 suites of tests to make in 2 different directories under 'test',
> and each of those directories is further decomposed into 4
> subdirectories - would I need one Makefile.am in each subdirectory or
> can I make it work from the Makefile.am in the test directory?)

You can do either.

1) This works:

--- tests/Makefile.am ----
TESTS = suite1/sub1/test1 suite1/sub1/test2 ... suite1/sub2/test1 \
        ... suite1/sub4/test1 suite2/sub1/test1 ...

2) but this will also work:

--- tests/Makefile.am ----
SUBDIRS = suite1 suite2

--- tests/suite1/Makefile.am ----
TESTS = sub1/test1 sub1/test2 ... sub2/test1 \
        ... sub4/test1

--- tests/suite2/Makefile.am ----
TESTS = sub1/test1 ...

3) or a split up in even more subdirectories.

The thing you gotta remember is that all Makefile.am files need to be
listed in some AC_CONFIG_FILES([...]) argument (with the trailing .am
removed) in configure.ac, and further, all non-terminal Makefile.am
files need SUBDIRS variables connecting the lower Makefile.am files.

There are slight differences in usage of course: with (1) you get only
one testsuite summary, with (2) you get two, and if you want to see all
failures, you should use 'make -k check'.  With (2), you can run 'make
check' inside the tests/suite1 subdir to only run that particular test
suite, with (1) you cannot subset so easily (but see the Automake manual
for ways out).

If you want to be able to run tests in parallel, you should look into
the Automake option parallel-tests, see the Automake manual for more
info.

Hope that helps.

Cheers,
Ralf



reply via email to

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