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

Eric Noulard eric.noulard at gmail.com
Thu Jan 26 16:37:22 EST 2012


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.


> May be you can show us your current ctest script?
>
>
>>
>> -----Original Message-----
>> From: Kedzierski, Artur CIV NSWC Corona, PA13
>> Sent: Friday, December 02, 2011 8:56
>> To: 'cmake at cmake.org'
>> Subject: Testing 'install' with CTest
>>
>> Hi,
>>
>> Is there any way for CTest to execute the 'install' target in addition to compilation, unit
>> testing, etc.? I.e. 'make install' on Linux and similar on other platforms. Then submit
>> the results to CDash.
>>
>> We have a continuous build that currently runs the CTest followed by 'make install' and
>> 'devenv ... /project install'. The problem is that when somebody changes one of
>> CMakeLists.txt files to modify INSTALL(...) and sets it incorrectly, CDash will have no record
>> of the error.
>>
>>
>> --
>>
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>
>
>
> --
> Erk
> Membre de l'April - « promouvoir et défendre le logiciel libre » -
> http://www.april.org



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


More information about the CMake mailing list