[Dune-devel] Add COMMAND variable to add_dune_test
Timo Koch
timo.koch at iws.uni-stuttgart.de
Tue Oct 27 19:56:59 CET 2015
Hi Dominic,
Yes. Maybe the doc can further state that the command will be wrapped by mpi
if MPI_RANKS is specified. Although using them together might not be too
useful.
Conerning CMD_ARGS, both commands have reason to exist, COMMAND actually
changes
the executed command and CMD_ARGS adds argument to an existing command.
So if COMMAND were a "SINGLE" argument in CMake they would actually not
even overlap.
You can always (I cannot think of a not always case, for && which you
shouldn't do anyway one would
have to write COMMAND "cmd1 && cmd2" anyway) split a command in a
command and it's arguments.
...
COMMAND ${PYTHON_EXEC},
CMD_ARGS path/testscript.py --type bla --other blub --superfast,
...
However, I don't see why we need to necessarily put that restriction
on the COMMAND argument. So people can also write
...
COMMAND ${PYTHON_EXEC} path/testscript.py --type bla --other blub
--superfast,
...
if they find it more readable or the split annoying.
Best wishes
Timo
On 27.10.2015 18:09, Dominic Kempf wrote:
> Greetings, fellow tester,
>
> I guess this has some valid use cases. Would you agree with the
> following proposal?
>
> dune_add_test(...
> [COMMAND cmd1 [cmd2 ..]]
> ...
> )
>
> Doc:
> You may specify the COMMAND option to give the exact command line to
> be executed
> when running the test. This defaults to the name of the executable
> added by dune_add_test
> for this test. Note, that if you specify both CMD_ARGS and COMMAND,
> the given CMD_ARGS
> will be put behind your COMMAND.
>
>
> On the other hand, one might argue, that there should but one of the
> CMD_ARGS and COMMAND
> parameters, but somehow repeating the program name just beacuse you
> pass an ini file seems silly
> too. Opinions?
>
> Best,
> Dominic
>
> On Tue, Oct 27, 2015 at 6:44 PM, Timo Koch
> <timo.koch at iws.uni-stuttgart.de
> <mailto:timo.koch at iws.uni-stuttgart.de>> wrote:
>
> Hi Dominic,
>
> looking over the new command and the application in DuMux I realized
> there is no option yet to alter the test command.
> We usually have wrapper scripts execute our executables for some
> more fancy tests.
>
> In add_dune_test the COMMAND variable is hard coded to the
> executable name
> plus mpi options. Would you be open to incoorporate a variable COMMAND
> on add_dune_test level that would overwrite that default? This
> would add quite
> a bit of flexiblilty IMO.
>
> Best wishes
>
> Timo
>
> --
> ____________________________________________________________________
>
> Timo Koch phone: +49 711 685 64676
> <tel:%2B49%20711%20685%2064676>
> IWS, Universität Stuttgart fax: +49 711 685 60430
> <tel:%2B49%20711%20685%2060430>
> Pfaffenwaldring 61 email:
> timo.koch at iws.uni-stuttgart.de <mailto:timo.koch at iws.uni-stuttgart.de>
> D-70569 Stuttgart url: www.hydrosys.uni-stuttgart.de
> <http://www.hydrosys.uni-stuttgart.de>
> ____________________________________________________________________
>
>
> _______________________________________________
> Dune-devel mailing list
> Dune-devel at dune-project.org <mailto:Dune-devel at dune-project.org>
> http://lists.dune-project.org/mailman/listinfo/dune-devel
>
>
--
____________________________________________________________________
Timo Koch phone: +49 711 685 64676
IWS, Universität Stuttgart fax: +49 711 685 60430
Pfaffenwaldring 61 email: timo.koch at iws.uni-stuttgart.de
D-70569 Stuttgart url: www.hydrosys.uni-stuttgart.de
____________________________________________________________________
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.dune-project.org/pipermail/dune-devel/attachments/20151027/b0aa99dc/attachment.htm>
More information about the Dune-devel
mailing list