Discussion:
passing flags to make check targets
dave
2013-11-29 18:20:15 UTC
Permalink
Hello;

My TESTS= targets can accept flags and data and I would like to pass
things like files "-f test.dat" to them,


How do I do that?

Thanks,

Dave
Rhys Ulerich
2013-11-29 18:40:04 UTC
Permalink
My TESTS= targets can accept flags and data and I would like to pass things
like files "-f test.dat" to them,
How do I do that?
I am unsure if it is the party line answer, but I've generally written
a script invoking the binary and added that script to TESTS and
dist_check_SCRIPTS.

For example, in
https://github.com/RhysU/suzerain/blob/master/tests/test_diffwave_p3dfft.sh
I want to invoke my test_diffwave_p3dfft binary several times passing
in arguments. To do so I've written the test_diffwave_p3dfft.sh file
and used the snippet
# Filed under check_PROGRAMS so binary is built before test is executed
# There must be a better way to express this dependency, but this works
TESTS += test_diffwave_p3dfft.sh
dist_check_SCRIPTS += test_diffwave_p3dfft.sh
check_PROGRAMS += test_diffwave_p3dfft
within https://github.com/RhysU/suzerain/blob/master/tests/Makefile.am.

As you can tell from the comment, I suspect there's a better way to
register that test_diffwave_p3dfft.sh needs test_diffwave_p3dfft.sh
built first.

Hope that helps, and please tell me if you find something better,
Rhys

Loading...