Adding ignored tests to CTest XML output

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding ignored tests to CTest XML output

Kai Wolf
Hi all,

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?

Thanks in advance


--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake
Reply | Threaded
Open this post in threaded view
|

Re: Adding ignored tests to CTest XML output

Zack Galbreath
On Thu, Mar 22, 2018 at 4:08 AM, Kai Wolf <[hidden email]> 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.  Disabled tests are included in your Test.xml file, and they are shown on CDash as a slightly different flavor of "not run" test.

--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake