[CMake] Adding ignored tests to CTest XML output

Zack Galbreath zack.galbreath at kitware.com
Thu Mar 22 16:49:11 EDT 2018


On Thu, Mar 22, 2018 at 4:08 AM, Kai Wolf <kai.wolf at gmail.com> wrote:

> when adding some ignored tests into the CTestCustom.cmake file via the
> variable CTEST_CUSTOM_TESTS_IGNORE, I'd expect that those ignored tests
> will also be written into the XML output file generated by CTest, so that
> Jenkins or Teamcity is able to visualize this information.
>
> However, it seems that even though the tests are indeed not executed when
> running CTest, they're also not put into the XML file, for instance with
> <Test Status="ignored">. Is this behaviour expected or am I missing
> something?
>

You can use set_tests_properties to mark a test as DISABLED
<https://cmake.org/cmake/help/latest/prop_test/DISABLED.html>.  Disabled
tests are included in your Test.xml file, and they are shown on CDash as a
slightly different flavor of "not run" test.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cmake.org/pipermail/cmake/attachments/20180322/a2d1ffb4/attachment-0001.html>


More information about the CMake mailing list