[Top][All Lists]

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

Re: [PPL-devel] Re: Doing something just a bit more complex than `make c

From: Roberto Bagnara
Subject: Re: [PPL-devel] Re: Doing something just a bit more complex than `make check'
Date: Sat, 07 Jan 2006 18:12:06 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20050929 Thunderbird/1.0.7 Fedora/1.0.7-1.1.fc4 Mnenhy/

Ralf Wildenhues wrote:
Hello there,

* Roberto Bagnara wrote on Wed, Oct 19, 2005 at 09:13:16PM CEST:

Instead, what I would like to have is to only say

test1_SOURCES =
test2_SOURCES =

and then achieve the effect of (sorry for the pseudo-code)

  for flags in $FLAGS_CHOICES
     make check with CXXFLAGS="$flags"
force recompilation at the next iteration (e.g., by erasing executables)

How can I best obtain this effect without giving up (too many of)
the advantages offered by Automake?

I believe something along these lines may be achieved by

| check_SCRIPTS = runtests
| check_PROGRAMS = test1 test2
| test1_SOURCES =
| test2_SOURCES =
| TESTS = $(check_SCRIPTS)
| my-check-clean:
|       rm -f $(check_PROGRAMS) *.o *.obj

in, and your pseudo code in `./runtests':
    for flags in $FLAGS_CHOICES
       make check CXXFLAGS="$flags" TESTS='test1 test2'
       make my-check-clean
       # to force recompilation at the next iteration

Surely the object removal is a bit of a hack, and should be adapted
unless your test suite lives in its own directory/
I haven't tested this, by the way; please complain if it doesn't work.  :)

Dear Ralf,

thank you very much for your help (and sorry for the delay, but I wanted
to make sure we did all our homework before getting back to you).
Here is the script we are using:

The dirty_marker trick allows us to avoid useless recompilations yet
addressing the case where one run of tests is interrupted.
We have also managed not to duplicate the list of tests and
to deal with XFAILs in a satisfactory way.  Any further advice you may
have is very welcome.

If you want to go much further, you either end up creating more complex
shell scripts, or using one of the more advanced test suite creation
tools: Autoconf's Autotest, DejaGNU, ...

Autotest looks attractive.  We may consider switching to it as soon
as it stabilizes.
All the best, and thanks again,


Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy

reply via email to

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