[CMake] make test

Alan W. Irwin irwin at beluga.phys.uvic.ca
Fri Mar 28 17:19:22 EDT 2008


On 2008-03-28 20:59+0100 Alexander Neundorf wrote:

> On Friday 28 March 2008, Alan W. Irwin wrote:
>> On 2008-03-14 13:04-0700 Alan W. Irwin wrote:
>>> Another concern with the current "make test" is it does not depend on the
>>> default "all" target.  That is a bad oversight IMO, since the current
>>> situation is you will be running out-of-date tests after some code fixup
>>> unless you remember to run "make" before "make test".
>>
>> I just was reminded I reported this as bug
>> http://public.kitware.com/Bug/view.php?id=4615 in March last year.
>>
>> No action yet.
>
> Actually I would recommend to run ctest directly, you can do much more with
> it.

Sure, I agree ctest has some additional options that are useful in certain
circumstances, but that is a side issue since "make test" does run ctest in
a way (runs all tests) that is useful for many users. Thus, the assumption
of the bug report is "make test" is here to stay and it is concerned with
having the correct dependencies for "make test".  Of course, if you want to
remove "make test" altogether, that is a different story.

> Then it's also more obvious that it doesn't depend on all

I am probably missing something because I don't understand this comment. All
of the PLplot tests depend on libraries and test examples being built in the
build tree, and I would think that would be true of most other projects.
Thus, if you have failed to run "make all" before running ctest by hand you
will get an error (if you are starting with a clean build tree) or
potentially out-of-date tests (which is more serious since the effect is
more subtle) if you are working with an existing build.  In fact, if the
CMake developers agree to implement "test" depending on "all", this would be
a motivation for using "make test" rather than running the ctest command by
hand.

Alex, is your concern that "all" is too comprehensive a dependency?  In that
case, you could change ADD_TEST to allow setting specific dependencies that
would be honored by "make test", but that might be overkill.

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