Skip to content

Adding support for top-level testcase elements

Rodrigo Tobar requested to merge support_top_level_testcase_elements into master

The rationale for this change is two-fold: on the one hand, some of the JUnit XML schemas out in the internet seems to support top-level testcase elements, on top of the testcase elements embedded into the testsuite ones. And on the other, tools like ctest (the testing counterpart of cmake) don't have the concept of test suites, and hence their reports are a simple list of test outcomes, which when translated to the JUnit XML format results on a sequence of top-level testcase elements.

This patch adds support for reacting to top-level testcase elements optionally, and turns the support on when parsing the unit-tests.xml file (but not linting.xml). On top of that a number of changes have been done to the code to make it more compact and easier to read, resulting overall in less lines of code for more functionality.

Merge request reports