[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Launch bash script for functional testing with "make check" and "mak
Re: Launch bash script for functional testing with "make check" and "make distcheck"
Wed, 09 Jan 2013 13:22:09 +0100
On 01/09/2013 05:41 AM, Timothée Flutre wrote:
> I am using Autotools for my C++ package. My package has a single
> binary (let's call it "myprog"). I also wrote a bash script,
> "launch_functional_tests.bash". This script has 4 steps:
> (1) create input files,
> (2) generate expected output files (by launching something like "R
> (3) launch "myprog" on the input files,
> (4) compare the outputs of "prog" with the expected outputs generated
> by the R script at step 2.
> In step 3, "launch_functional_tests.bash" needs to know the path to
> "myprog". If I run the bashs cript on standalone myself, I give the
> path to "myprog" as an option on the command-line. But what can I do
> when using make check?
Pass is as an environment variable instead, and define that in
AM_TESTS_ENVIRONMENT ; e.g. (untested):
AM_TESTS_ENVIRONMENT = \
(yes, the semicolon at the end is really required).
That should work in VPATH setups as well, and in particular, in
 Reference to documentation:
 If you are catering to Automake 1.11 as well, you should use
TESTS_ENVIRONMENT instead of the safer AM_TESTS_ENVIRONMENT,
since the former is only supported starting with Automake 1.12.