[CMake] ctest question

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sun Sep 23 23:08:51 EDT 2007


On 2007-09-23 18:48-0700 Sanchez, Juan wrote:

> Would this sound reasonable?
> Write a perl script with the name of the test program and golden result file as arguments.  The perl script will run the test and compare the output results with the golden file and then return success or failure.

ADD_TEST allows you to run any command-line executable with any arguments.

You will find that running a script (bash or perl or python) is one option,
but that may be overkill for what you appear to want.  Why not simply run
diff, i.e.,

ADD_TEST(my_first_test diff -q goldenfile testfile)

?

If that hint isn't quite right for your needs, then I suggest you implement
some really simple examples of ADD_TEST to see what is possible, and what
the resulting ctest results look like.  (That is one of the nice things
about cmake; you can make a complete example with just a few lines to
explore and learn about any part of it.)

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list