[Top][All Lists]

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

Re: Passing arguments to test programs during test suite

From: Ralf Wildenhues
Subject: Re: Passing arguments to test programs during test suite
Date: Fri, 15 Apr 2011 20:19:21 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Jeff,

* Daily, Jeff A wrote on Fri, Apr 15, 2011 at 08:06:56PM CEST:
> I'm using automake 1.11.1's 'parallel-tests' test suite capabilities.  It's
> been fine so far.  I even hacked it a little to support launching my MPI
> programs.  I have some tests that run serially (without MPI) and some that
> do:
> maybe_mpi=`if echo "$(SERIAL_TESTS)" | $(GREP) "$$p" > /dev/null; then echo
> ""; else echo "$(MPIEXEC)"; fi`; \
> $$maybe_mpi
> Users run the test suite using something like
> make check MPIEXEC="mpiexec -np 4"
> On one particular platform we don't use MPI but instead have our own process
> manager built into each of our programs.  This means each program must be
> launched by passing command-line arguments such as "-np 4".  How can I do
> this?  I tried:
> maybe_mpi=`if echo "$(SERIAL_TESTS)" | $(GREP) "$$p" > /dev/null; then echo
> ""; else echo "$(MPIEXEC)"; fi`; \
> tst="$$dir$$f -np 4"; \
> $$maybe_mpi

Make that last line
  eval "$$maybe_mpi"


> To make things even harder, I have some test programs which take specific
> command-line arguments.  I've been leaving them out of the test suite since
> I can't figure out how to pass command-line arguments to any tests let alone
> individual tests.

We should add support for that.  Right now your best bet is a wrapper
script that transports its options to the programs options.  That
wrapper script can be part of LOG_COMPILER.

If your MPI and non-MPI programs have different suffixes, you could make
things simpler; for example:

TEST_SUFFIXES = .t .t-mpi

FWIW, we still go a simpler way and have a wrapper script for each test.
It sources a defs scriptlet (generated from $(srcdir)/ that
contains a more-or-less portable shell function to start MPI jobs.
The shell function aims to work also with batch schedulers like qsub.

Hope that helps.


reply via email to

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