[CMake] CTest dependencies on tests
Neil Chittenden
neilchittenden at quintessa.org
Thu May 5 11:10:15 EDT 2011
Hi
Using CTest, it is possible to set a dependency on another test using:
add_test(test1 test1.sh this is test 1)
add_test(test2 test2.sh this is test 2)
set_tests_properties(test1 PROPERTIES DEPENDS test2)
Is it possible to:
a) only run a test (test1 in my example) if the test it depends on
(test2) is successful rather than always running the test
b) set an expected return code for the test. e.g. test1 is only
successful if it returns 1 and returning 0 or 2 is a fail.
I know I could handle these in my test scripts but was just wondering if
there was a more elegant solution using CTest.
Cheers
---
Neil
More information about the CMake
mailing list