[CMake] for install before running tests
Juan Sanchez
Juan.Sanchez at amd.com
Tue Oct 9 15:00:56 EDT 2007
Thanks for your response. Unfortunately, I don't have control over the
original script to be run. Creating a similar script creates a forking
issue, where I am always 2 steps behind the people updating the original
script.
The install target is meant to copy the files into the original source
tree, with specific directories for each build type. The regression
script is keyed into this directory structure.
Is there a way to force the install target as a default build?
Perhaps it'd be best for me to create a POST_BUILD ADD_CUSTOM_COMMAND,
which will put a copy of the binary and libraries in the correct place?
Regards,
Juan
Alan W. Irwin wrote:
> On 2007-10-09 10:12-0500 Juan Sanchez wrote:
>
>> The test scripts for an existing project rely greatly on the installed
>> directory structure.
>
> For your information, that's contrary to the fundamental idea behind ctest
> (and autotools "make check" as well) which is that all tests are run in the
> build tree (i.e., potentially before "make install" is run).
>
> For the PLplot case we had a test script that was originally designed to
> work just for the install-tree case, but back in our autotools days we
> modified that script to have an option to work in the build-tree case to
> deal with the "make check" autotools case. That option continued to be
> implemented as part of our later CMake-based build system. For that case,
> when the build-tree option is on, the test script depends strictly on build
> tree executables, libraries, shell scripts, and data files rather than their
> installed counterparts, and the test script is run indirectly by ctest
> from the build tree.
>
> The approach of having a test script with build-tree and install-tree
> options gives us the best of both worlds.
>
> (1) A comprehensive install-tree test (run from the install tree by merely
> executing the test script) for those who install PLplot (including end users
> of PLplot who tend to install it in binary form only).
>
> (2) A virtually identical build-tree test run by ctest for those who build
> PLplot. The latter is especially useful to our developers to check the
> recent changes they have made. In the future we also plan to take the next
> obvious step with our testing which is to use ctest for nightly automated
> testing of our svn repository with results collected by a dartboard server.
>
> I suggest a similar approach where you modify your install-tree only script
> to have a build-tree option as well would be well worth your while.
>
> 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
> __________________________
>
>
--
Juan Sanchez
Juan.Sanchez at amd.com
800-538-8450 Ext. 54395
512-602-4395
More information about the CMake
mailing list