Adjusting CTest Test.xml results for Jenkins

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Adjusting CTest Test.xml results for Jenkins

Игорь Иванов
We are using Jenkins and want it to parse CTest results. There is
already a plugin for that, that takes Test.xml produced by `ctest -T
Test` as an input. In `Test.xml` there are records like this:

<Test Status="passed">

We run `cmake --build; ctest` multiple times in different directories
for x86+x64 and Debug+Release builds, which results in multiple
`Test.xml` files. After aggregating them, Jenkins plugin outputs report
like this:
       TEST_netutils  5.3 sec  Passed
       TEST_netutils  5.1 sec  Passed
       TEST_netutils  2.8 sec  Passed
       TEST_netutils  2.9 sec  Passed

which is kinda unreadable, you cannot immediately guess which test is
which one. Turns out that if we replace the <Path> property in XML from
`/var/lib/jenkins/workspace/build` to something like `build-32-debug`,
the report becomes more readable:
       TEST_netutils  5.3 sec  Passed
       TEST_netutils  5.1 sec  Passed

Is it possible to feed to CTest some -Dparameters or ENV_VARS to provide
needed values in Path, instead of writing a script to replace XML
contents afterwards?

Powered by

Please keep messages on-topic and check the CMake FAQ at:

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

CMake Support:
CMake Consulting:
CMake Training Courses:

Visit other Kitware open-source projects at

Follow this link to subscribe/unsubscribe: