[CMake] Testing 'install'/'package' with CTest

Eric Noulard eric.noulard at gmail.com
Thu Jan 26 16:42:35 EST 2012


2012/1/26 Eric Noulard <eric.noulard at gmail.com>:
> 2012/1/26 Eric Noulard <eric.noulard at gmail.com>:
>> 2012/1/26 Kedzierski, Artur CIV NSWC Corona, PA13 <artur.kedzierski at navy.mil>:
>>> Since I didn't receive any responses, I figured that I'll try asking this question again.
>>> I would like CTest nightly/continuous test my 'install'/'package' target and submit the
>>> results to CDash. Is there currently any way to do that?
>>
>> In your ctest script did try to insert
>>
>> ctest_build(BUILD yourbuildir TARGET package APPEND)
>>
>> after your (may be)
>> ctest_build(BUILD yourbuildir APPEND)
>
> Sorry but this does not seem to work "as-is".
> However adding
>
> add_test(TestPackage ${CMAKE_BUILD_TOOL} package)
>
> works: it adds a new test "TestPackage" which consist in running the
> "build tool" in order to build the "package" target.
>
> In my test case the add_test is added in the main CMakeLists.txt.

Example result of such test:
http://my.cdash.org/testDetails.php?test=8657823&build=288675

This is for an Open Source project:
https://savannah.nongnu.org/projects/certi

You can check,
The main CMakeLists.txt:
http://cvs.savannah.gnu.org/viewvc/certi/CMakeLists.txt?root=certi&view=log

The ctest scripts used:
http://cvs.savannah.gnu.org/viewvc/certi/scripts/certi-ctest.cmake?root=certi&view=log

-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org


More information about the CMake mailing list