Gaetan Lehmann wrote:

Hi,

I'm trying to run a different code some test with different path depending of the configuration (debug, release, ...) with Xcode and cmake 2.4.2

I have seen on the mailing list that ${CTEST_CONFIGURATION_TYPE} should be expanded to the configuration type. However, it seem to be expanded to an empty string.

ADD_TEST(mytest echo "testing \${CTEST_CONFIGURATION_TYPE}")

produce:

Start processing tests
Test project
Constructing a list of tests
Done constructing a list of tests
Changing directory into /Users/glehmann/src/contrib-itk/WrapITK/build-xcode/Python/Tests
  1/ 33 Testing mytest
Test command: /bin/echo testing\
testing
-- Process completed
   Passed

The following tests passed:
        mytest

100% tests passed, 0 tests failed out of 1


What is the right way to use configuration type with tests ?

This is correct, but you actually have to specify a configuration type when running tests. Try running the tests like this:

ctest -R mytest -C Debug

-Brad

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to