[CMake] Unable to locate test area for running CTest

Philip Lowman philip at yhbt.com
Fri Jan 30 02:10:32 EST 2009


On Thu, Jan 29, 2009 at 12:00 PM, Ashutosh Juneja <ashutosh.juneja at gmail.com
> wrote:

> Hi,
>
>
>
> I want to do regression testing using CTest after building through cmake.
> My test area (c:/test/T1 T2 T3…) and build area (c:/build) have these
> locations.
>
> My test requires to 'cd' to test area T1, and then execute perl commands. I
> do these steps:
>
>
>
>    1. Run cmake from source tree, having multiple ADD_TEST commands in
>    CMakeList.txt of source tree.
>    2. It generates CTestTestfile.cmake in binary tree.
>    3. Then I run ctest from build area. But tests fail to start as they
>    are unable to locate test area.
>
>  I want to know how can I specify test area location and start test
> execution in same ADD_TEST command?
>
> If I specify ADD_TEST in CMakeList.txt of test area (c:/test), it does not
> produce CTestTestfile.cmake in test area?
>

You could create a small wrapper perl script that executes the chdir() for
you based on where the wrapper script is located on the filesystem and then
calls the actual test.

I don't see a test property that allows you to configure the working
directory.  You could also propose this be added in a feature request and/or
submit a patch.  It might not be very useful to WIN32 developers but I'm
sure others might like the option.

-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090130/ed798b14/attachment.htm>


More information about the CMake mailing list