automake
[Top][All Lists]
Advanced

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

Re: how to run a test file with command line options...


From: Thien-Thi Nguyen
Subject: Re: how to run a test file with command line options...
Date: 17 Jun 2005 19:28:49 -0400
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Ed Hartnett <address@hidden> writes:

> Howdy all!
> 
> If I have some tests, and want to run them with command line options,
> how do I do it?
> 
> For example, I have to have a shell script to run tst_parallel below,
> because it needs to be called with the poe command, and some env vars
> set. In other cases, I need to call test program with some command
> line options.
> 
> check_PROGRAMS = tst_parallel
> TESTS = run_par_test.sh
> 
> Where run_par_test.sh is:
> 
> MP_TASKS_PER_NODE=4 MP_PROCS=4 poe ./tst_parallel
> 
> This works, but is there a way to do this in the Makefile.am, and not
> use a shell script?


i remember trying to push the limits of automake testing facilities
awhile back, w/o much joy, but perhaps things are better now.  still,
since you already have a shell script you might as well (ab)use it to
get the desired flexibility.  indirection is one of the classic (and
effective) solutions to Hard Problems everywhere; giving it up seems to
be a step backwards.

you could, for example, set the TESTS_ENVIRONMENT makefile variable (or
parts of it) and have the shell script dispatch based on the values, or
filter/pass them to the program as input/arguments.

thi




reply via email to

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