[CMake] ctest: how to skip tests?
Andreas Schneider
mail at cynapses.org
Wed Jul 2 08:18:11 EDT 2008
Dave Milter wrote:
> Hi.
>
> I have project with usage of cmake and ctest.
>
> Now I need to add tests, that may have sense or not have sense to run
> on certain machine.
>
> For example, if we have installed MySql and libmysql there is sense to
> test part of code working with mysql, but no sense to check parts that
> working with
> postgresql or oracle, if there are no such software on machine.
>
> But all code that work with different databases are part of our product,
> so we need to warn that some part of test suite is not running.
>
Normally you create a "CTestCustom.cmake" file.
if (NOT ${MYSQL_FOUND})
set(CTEST_CUSTOM_TESTS_IGNORE
${CTEST_CUSTOM_TESTS_IGNORE}
test1
test2
)
endif (NOT ${MYSQL_FOUND)
...
http://www.cmake.org/Wiki/CMake_Testing_With_CTest#Customizing_CTest
-- andreas
--
http://www.cynapses.org/ - cybernetic synapses
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 257 bytes
Desc: OpenPGP digital signature
URL: <http://www.cmake.org/pipermail/cmake/attachments/20080702/9591d269/attachment.pgp>
More information about the CMake
mailing list