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">
<Name>TEST-netutils</Name>
<Path>/var/lib/jenkins/workspace/build/tech1utils</Path>
<FullName>/var/lib/jenkins/workspace/build/tech1utils/TEST-netutils</FullName>
<FullCommandLine>/var/lib/jenkins/workspace/build/tech1utils/test-netutils-core2</FullCommandLine>
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:
projectroot.var.lib.jenkins.workspace.build:
tech1utils:
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:
projectroot.build-32-debug:
tech1utils:
TEST_netutils 5.3 sec Passed
projectroot.build-64-debug:
tech1utils:
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 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