[Top][All Lists]

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

Re: Automake TESTS question

From: Ralf Wildenhues
Subject: Re: Automake TESTS question
Date: Sun, 18 May 2008 14:11:44 +0200
User-agent: Mutt/1.5.17+20080114 (2008-01-14)

* John Calcote wrote on Fri, May 16, 2008 at 11:00:40PM CEST:
> But this requires me to:
> 1) Actually HAVE a one-line script file called "" as part of
> my package.
> 2) Use the EXTRA_DIST line. Why is this? Can't Automake tell from the
> TESTS line that this is a file I need in my distribution?

You can use
  check_SCRIPTS =

Note that some make implementations have a builtin implicit rule to
update greptest from (which may or may not affect your

> In my experiments, I've also discovered this method:
>        echo 'myprog | grep "myprog text"' >
> clean-local:
>        -rm
> But this seems overly complex for a one-liner.

Agreed.  Also I think that use of TESTS_ENVIRONMENT does not extend
nicely (and isn't covered by the documentation).

> In addition, I had to add
> the TESTS_ENVIRONMENT line because I could NOT get chmod to set
> to executable. The make utility just seemed to ignore the
> command, if I added it after the echo line.

I don't understand this failure.

> The clean-local line was necessary in this case because "make distcheck"
>  complains that was left lying around, and the "-" in front
> of "rm" was necessary because otherwise "make clean" will fail if "make
> check" isn't run first.

Sounds fine.

> Anyone know of a more concise way of doing this? Frankly, I'd like to
> just run the script inline somewhere, but I can't see a way to do it
> with Automake. It wants all TESTS to be real files.

Yes, unfortunately Automake's TESTS feature is that simple-minded.
You could take a look at Automake's own test suite for some ideas
how to use it.

You may also want to look into other test suite frameworks.  Autotest
and DejaGNU come to mind, but there are others as well.

Hope that helps.


reply via email to

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